flake.nix Avoid useless genericity for building nixosConfigurations
All checks were successful
check / check (push) Successful in 32s

This commit is contained in:
Florian RICHER 2025-02-04 22:12:47 +01:00
parent 00097232e6
commit 9aff0c83c1
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77

View file

@ -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;
#####################################################################
#####################################################################