This commit is contained in:
Oliver Davies 2025-11-19 18:00:00 +00:00
parent d8579a38c5
commit 06e45eeea4

View file

@ -17,7 +17,7 @@
username = "opdavies";
};
mkNixosConfiguration =
mkHost =
{
hostname,
modules ? [ ],
@ -27,8 +27,17 @@
inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = modules ++ [
modules =
modules
++ (
# TODO: remove once everything has bee moved to modules.
if builtins.pathExists "${self}/hosts/${hostname}/configuration.nix" then
"${self}/hosts/${hostname}/configuration.nix"
else
[ ]
)
++ [
(config.flake.modules.nixos."nixosConfigurations/${hostname}" or { })
];
specialArgs = specialArgs // {
@ -38,17 +47,13 @@
in
{
nixosConfigurations = {
nixedo = mkNixosConfiguration rec {
nixedo = mkHost {
hostname = "nixedo";
stateVersion = "24.11";
modules = [ config.flake.modules.nixos."nixosConfigurations/${hostname}" ];
};
t480 = mkNixosConfiguration rec {
t480 = mkHost {
hostname = "t480";
modules = [ config.flake.modules.nixos."nixosConfigurations/${hostname}" ];
};
};
};