flake.nix Avoid useless genericity for building nixosConfigurations
All checks were successful
check / check (push) Successful in 32s
All checks were successful
check / check (push) Successful in 32s
This commit is contained in:
parent
00097232e6
commit
9aff0c83c1
1 changed files with 25 additions and 28 deletions
37
flake.nix
37
flake.nix
|
@ -69,12 +69,6 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
systems = [
|
||||
{ name = "nixos-test"; system = "x86_64-linux"; }
|
||||
{ name = "perso-laptop"; system = "x86_64-linux"; }
|
||||
{ name = "perso-desktop"; system = "x86_64-linux"; }
|
||||
];
|
||||
|
||||
home-modules = with inputs; [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
nix-doom-emacs.hmModule
|
||||
|
@ -84,18 +78,11 @@
|
|||
nur.overlays.default
|
||||
nixgl.overlay
|
||||
];
|
||||
in {
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# Configure all nixos configurations
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
nixosConfigurations = nixpkgs.lib.foldl (c: s:
|
||||
c // {
|
||||
${s.name} = nixpkgs.lib.nixosSystem {
|
||||
inherit (s) system;
|
||||
|
||||
customNixosSystem = { name, system, extraModules ? [] }: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/${s.name}/configuration.nix
|
||||
./hosts/${name}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
agenix.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
|
@ -106,12 +93,22 @@
|
|||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = inputs;
|
||||
home-manager.users.florian.imports = home-modules ++ [
|
||||
./hosts/${s.name}/home.nix
|
||||
./hosts/${name}/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
] ++ extraModules;
|
||||
};
|
||||
in {
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
# Configure all nixos configurations
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
nixosConfigurations = {
|
||||
nixos-test = customNixosSystem { name = "nixos-test"; system = "x86_64-linux"; };
|
||||
perso-laptop = customNixosSystem { name = "perso-laptop"; system = "x86_64-linux"; };
|
||||
perso-desktop = customNixosSystem { name = "perso-desktop"; system = "x86_64-linux"; };
|
||||
};
|
||||
}) {} systems;
|
||||
|
||||
#####################################################################
|
||||
#####################################################################
|
||||
|
|
Loading…
Add table
Reference in a new issue