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
53
flake.nix
53
flake.nix
|
@ -69,12 +69,6 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
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; [
|
home-modules = with inputs; [
|
||||||
nix-flatpak.homeManagerModules.nix-flatpak
|
nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
nix-doom-emacs.hmModule
|
nix-doom-emacs.hmModule
|
||||||
|
@ -84,34 +78,37 @@
|
||||||
nur.overlays.default
|
nur.overlays.default
|
||||||
nixgl.overlay
|
nixgl.overlay
|
||||||
];
|
];
|
||||||
|
|
||||||
|
customNixosSystem = { name, system, extraModules ? [] }: nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./hosts/${name}/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
agenix.nixosModules.default
|
||||||
|
lanzaboote.nixosModules.lanzaboote
|
||||||
|
disko.nixosModules.disko
|
||||||
|
{ nixpkgs.overlays = overlays; }
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = inputs;
|
||||||
|
home-manager.users.florian.imports = home-modules ++ [
|
||||||
|
./hosts/${name}/home.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
#####################################################################
|
#####################################################################
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Configure all nixos configurations
|
# Configure all nixos configurations
|
||||||
#####################################################################
|
#####################################################################
|
||||||
#####################################################################
|
#####################################################################
|
||||||
nixosConfigurations = nixpkgs.lib.foldl (c: s:
|
nixosConfigurations = {
|
||||||
c // {
|
nixos-test = customNixosSystem { name = "nixos-test"; system = "x86_64-linux"; };
|
||||||
${s.name} = nixpkgs.lib.nixosSystem {
|
perso-laptop = customNixosSystem { name = "perso-laptop"; system = "x86_64-linux"; };
|
||||||
inherit (s) system;
|
perso-desktop = customNixosSystem { name = "perso-desktop"; system = "x86_64-linux"; };
|
||||||
modules = [
|
};
|
||||||
./hosts/${s.name}/configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
agenix.nixosModules.default
|
|
||||||
lanzaboote.nixosModules.lanzaboote
|
|
||||||
disko.nixosModules.disko
|
|
||||||
{ nixpkgs.overlays = overlays; }
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = inputs;
|
|
||||||
home-manager.users.florian.imports = home-modules ++ [
|
|
||||||
./hosts/${s.name}/home.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}) {} systems;
|
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
Loading…
Add table
Reference in a new issue