Compare commits

...

6 commits

Author SHA1 Message Date
Katherina Walshe-Grey 0b6d72a4b6 qenya/vscode: disable automatic flake input evaluation
Unfortunately the memory requirements are too high to meet realistically
(tested with 8 GiB; still failed).
2024-09-18 19:45:18 +01:00
Katherina Walshe-Grey 6a1597aee8 Update README.md 2024-09-18 19:38:59 +01:00
Katherina Walshe-Grey e713fe3b2c nix, home-manager: move common config out of flake.nix 2024-09-18 19:38:20 +01:00
Katherina Walshe-Grey a47d1f47e8 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/e1391fb22e18a36f57e6999c7a9f966dc80ac073' (2024-07-03)
  → 'github:nix-community/home-manager/2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594' (2024-09-17)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6e99f2a27d600612004fbd2c3282d614bfee6421' (2024-08-30)
  → 'github:NixOS/nixpkgs/086b448a5d54fd117f4dc2dee55c9f0ff461bdc1' (2024-09-16)
• Updated input 'nur':
    'github:nix-community/NUR/444e1f3fdf23aa476489b0038e0738c6f4d9df85' (2024-09-04)
  → 'github:nix-community/NUR/59c5c2575c0cae6bc98b9de8161731cfb8cdc1f0' (2024-09-18)
• Updated input 'plasma-manager':
    'github:nix-community/plasma-manager/60becd0e994e25b372c8d0500fc944396f6c1085' (2024-09-09)
  → 'github:nix-community/plasma-manager/5a0c70a007837e2db01e0bb68971792e8653d32c' (2024-09-16)
2024-09-18 19:05:11 +01:00
Katherina Walshe-Grey 28698d1a60 yevaud, orm, kalessin: switch to nixpkgs-small 2024-09-18 19:03:35 +01:00
Katherina Walshe-Grey ad1f4d2cc5 deduplicate flake outputs 2024-09-18 18:58:04 +01:00
7 changed files with 140 additions and 51 deletions

View file

@ -21,7 +21,7 @@ The canonical location for this repository is https://git.qenya.tel/qenya/nixfil
### Building
To build locally, run `colmena apply-local` as root.
To build locally, run `nixos-rebuild switch --flake .#[hostname]` as root.
To build the remote machines, run `colmena apply`. See the [colmena documentation](https://colmena.cli.rs/) for command-line options. Notable options include:
* `--on [hostname]`: build a specific machine only

View file

@ -6,6 +6,7 @@
./environment.nix
./home-manager.nix
./nginx.nix
./nix.nix
./openssh.nix
./security.nix
./steam.nix

7
common/nix.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
nix.settings.experimental-features = "nix-command flakes";
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
nixpkgs.config.allowUnfree = true;
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, inputs, ... }:
let keys = import ../../keys.nix;
in {
@ -11,4 +11,6 @@ in {
};
programs.zsh.enable = true;
home-manager.users."qenya" = inputs.self.homeManagerModules."qenya";
}

View file

@ -39,6 +39,60 @@
"url": "https://git.qenya.tel/qenya/birdsong"
}
},
"colmena": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"stable": "stable"
},
"locked": {
"lastModified": 1711386353,
"narHash": "sha256-gWEpb8Hybnoqb4O4tmpohGZk6+aerAbJpywKcFIiMlg=",
"owner": "zhaofengli",
"repo": "colmena",
"rev": "cd65ef7a25cdc75052fbd04b120aeb066c3881db",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"repo": "colmena",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -67,11 +121,11 @@
]
},
"locked": {
"lastModified": 1720042825,
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"lastModified": 1726592409,
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
"type": "github"
},
"original": {
@ -83,11 +137,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725001927,
"narHash": "sha256-eV+63gK0Mp7ygCR0Oy4yIYSNcum2VQwnZamHxYTNi+M=",
"lastModified": 1726447378,
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
"type": "github"
},
"original": {
@ -97,13 +151,29 @@
"type": "github"
}
},
"nixpkgsSmall": {
"locked": {
"lastModified": 1726611721,
"narHash": "sha256-oSDOQ5c7CTVzkaG5A19UW3Yxsv9TLNFNcrvQT9F4Pz0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a51a2cef87fc37c7e31d3a5345bc493e5f7a5f6e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1725486293,
"narHash": "sha256-XRWbx8JcTCVoGxr3P2YL/tK4s4HzZBhUqlxr91zLOZs=",
"lastModified": 1726681508,
"narHash": "sha256-xz858EXcKZjWR6TPyU84BTeMHIPewGW68DutnxghaR4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "444e1f3fdf23aa476489b0038e0738c6f4d9df85",
"rev": "59c5c2575c0cae6bc98b9de8161731cfb8cdc1f0",
"type": "github"
},
"original": {
@ -122,11 +192,11 @@
]
},
"locked": {
"lastModified": 1725914634,
"narHash": "sha256-U74hu15xSb6JNySMOwyJrsh4uk1DVa182bdHLeHdYMc=",
"lastModified": 1726509788,
"narHash": "sha256-PmCmO8NDKzwHrTp9Ox/rcLiCYivqIpZlnLk8wZRjv2I=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "60becd0e994e25b372c8d0500fc944396f6c1085",
"rev": "5a0c70a007837e2db01e0bb68971792e8653d32c",
"type": "github"
},
"original": {
@ -139,12 +209,30 @@
"inputs": {
"agenix": "agenix",
"birdsong": "birdsong",
"colmena": "colmena",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs",
"nixpkgsSmall": "nixpkgsSmall",
"nur": "nur",
"plasma-manager": "plasma-manager"
}
},
"stable": {
"locked": {
"lastModified": 1696039360,
"narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "32dcb45f66c0487e92db8303a798ebc548cadedc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,

View file

@ -2,6 +2,8 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgsSmall.url = "github:NixOS/nixpkgs/nixos-24.05-small";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
@ -23,39 +25,16 @@
};
};
colmena = {
url = "github:zhaofengli/colmena";
inputs.nixpkgs.follows = "nixpkgs";
};
birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main";
};
outputs = inputs@{ self, nixpkgs, home-manager, plasma-manager, nur, agenix, birdsong, ... }: {
nixosModules.default = {
nix.settings.experimental-features = "nix-command flakes";
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nur.overlay ];
# TODO: make this or something like it work without infinite recursion
# home-manager.users."qenya" = lib.mkIf (config.users.users ? "qenya") self.homeManagerModules."qenya";
home-manager.users."qenya" = self.homeManagerModules."qenya";
imports = [
home-manager.nixosModules.home-manager
nur.nixosModules.nur
agenix.nixosModules.default
birdsong.nixosModules.default
./common
./services
];
};
# TODO: simplify
nixosConfigurations = {
"kilgharrah" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/kilgharrah self.nixosModules.default ]; };
"tohru" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/tohru self.nixosModules.default ]; };
"yevaud" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/yevaud self.nixosModules.default ]; };
"orm" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/orm self.nixosModules.default ]; };
"kalessin" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/kalessin self.nixosModules.default ]; };
};
outputs = inputs@{ self, nixpkgs, nixpkgsSmall, home-manager, plasma-manager, nur, agenix, colmena, birdsong, ... }: {
nixosConfigurations = (colmena.lib.makeHive self.outputs.colmena).nodes;
# The name of this output type is not standardised. I have picked
# "homeManagerModules" as the discussion here suggests it's the most common:
@ -75,11 +54,26 @@
colmena = {
meta = {
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
nodeNixpkgs = builtins.mapAttrs (name: value: value.pkgs) self.nixosConfigurations;
nodeNixpkgs = {
kilgharrah = import nixpkgs { system = "x86_64-linux"; };
tohru = import nixpkgs { system = "x86_64-linux"; };
yevaud = import nixpkgsSmall { system = "x86_64-linux"; };
orm = import nixpkgsSmall { system = "x86_64-linux"; };
kalessin = import nixpkgsSmall { system = "aarch64-linux"; };
};
specialArgs = { inherit inputs; };
};
# TODO: eliminate duplication with nixosConfigurations
defaults.imports = [ self.nixosModules.default ];
defaults.imports = [
home-manager.nixosModules.home-manager
nur.nixosModules.nur
{ nixpkgs.overlays = [ nur.overlay ]; }
agenix.nixosModules.default
birdsong.nixosModules.default
./common
./services
];
kilgharrah.imports = [ ./hosts/kilgharrah ];
tohru.imports = [ ./hosts/tohru ];
yevaud.imports = [ ./hosts/yevaud ];

View file

@ -38,10 +38,7 @@ in
"nix.serverSettings".nil = {
diagnostics.ignored = [ "unused_binding" "unused_with" ];
formatting.command = [ "nixpkgs-fmt" ];
nix.flake = {
autoArchive = true;
autoEvalInputs = true;
};
nix.flake.autoArchive = true;
};
"terminal.integrated.allowChords" = false;
"terminal.integrated.defaultProfile.linux" = "zsh";