grace/dots

dotfiles/nix configs

git clone https://git.gae.moe/grace/dots

Grace Yoderflake rewrite + a bunch\ni keep holding onto changes forever this is not how you use vcs08de973

main
1.8 KiB76 linesraw
1{
2  host,
3  inputs,
4  lib,
5  pkgs,
6  ...
7}:
8{
9  nixpkgs.hostPlatform = host.system;
10  nixpkgs.config.allowUnfree = true;
11  nix.package = pkgs.lixPackageSets.stable.lix;
12  nix.nixPath = [
13    "nixpkgs=${inputs.nixpkgs}"
14    "home-manager=${inputs.home-manager}"
15    "darwin=${inputs.darwin}"
16  ];
17
18  nix.distributedBuilds = true;
19  nix.buildMachines = lib.optionals (host.name != "dijkstra") [
20    {
21      hostName = "dijkstra.i.gae.moe";
22      sshUser = "builder";
23      sshKey = "/root/.ssh/id_ed25519";
24      protocol = "ssh-ng";
25      systems = [ "x86_64-linux" ];
26      maxJobs = 8;
27      speedFactor = 4;
28      supportedFeatures = [
29        "kvm"
30        "big-parallel"
31        "nixos-test"
32        "benchmark"
33      ];
34    }
35  ];
36  nix.settings.builders-use-substitutes = true;
37  nix.gc = {
38    automatic = true;
39    options = "--delete-older-than 30d";
40  }
41  // lib.optionalAttrs (host.type == "nixos") {
42    dates = "weekly";
43    randomizedDelaySec = "1h";
44  }
45  // lib.optionalAttrs (host.type == "darwin") {
46    interval = [
47      {
48        Weekday = 0;
49        Hour = 3;
50        Minute = 15;
51      }
52    ];
53  };
54  programs.ssh.knownHosts.dijkstra = {
55    hostNames = [
56      "dijkstra.i.gae.moe"
57      "d.i.gae.moe"
58    ];
59    publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEAQ463pWxkNc6IxhKMxKaQmvswnkO4UytR0v38ZL0v0";
60  };
61  programs.ssh.knownHosts.knuth = {
62    hostNames = [
63      "knuth.i.gae.moe"
64      "k.i.gae.moe"
65    ];
66    publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mXbG9oj+uGSYVwxR9eedbZbdDJ6N+vnaOJfT6dkK0";
67  };
68  programs.ssh.knownHosts.vulcan = {
69    hostNames = [ "vulcan.moe" ];
70    publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFbrncs13r5yxwPZreDwgRJg0t9ngRSw9rCnYl9cN8fk";
71  };
72
73  security.sudo.extraConfig = lib.optionalString (host.type == "nixos") ''
74    Defaults env_keep += "XDG_CONFIG_HOME EDITOR VISUAL JJ_CONFIG"
75  '';
76}