Skip to content

Commit

Permalink
use mkMerge instead of imports in nixos-configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Dec 26, 2024
1 parent 7b39c7c commit 5d6d017
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions nixos-configurations/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@
util,
...
}:
{
imports =
util.readModulesDir ./.
|> lib.mapAttrsToList (
hostName: path: {
flake =
let
nixosConfiguration = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit self; };
modules = [
path
{ networking = { inherit hostName; }; }
];
};
util.readModulesDir ./.
|> lib.mapAttrsToList (
hostName: path: {
flake =
let
nixosConfiguration = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit self; };
modules = [
path
{ networking = { inherit hostName; }; }
];
};

system = nixosConfiguration.config.nixpkgs.hostPlatform.system;
in
{
nixosConfigurations.${hostName} = nixosConfiguration;
checks.${system}."nixosConfigurations/${hostName}" =
nixosConfiguration.config.system.build.toplevel;
};
}
);
}
system = nixosConfiguration.config.nixpkgs.hostPlatform.system;
in
{
nixosConfigurations.${hostName} = nixosConfiguration;
checks.${system}."nixosConfigurations/${hostName}" =
nixosConfiguration.config.system.build.toplevel;
};
}
)
|> lib.mkMerge

0 comments on commit 5d6d017

Please sign in to comment.