Refactor
This commit is contained in:
parent
d8579a38c5
commit
06e45eeea4
1 changed files with 15 additions and 10 deletions
|
|
@ -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}" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue