refactor: move system creation to function
This commit is contained in:
parent
f2e1e9c5d2
commit
bb7342d876
1 changed files with 22 additions and 8 deletions
30
flake.nix
30
flake.nix
|
@ -25,15 +25,15 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in
|
|
||||||
{
|
mkSystem =
|
||||||
nixosConfigurations = {
|
{
|
||||||
marr = lib.nixosSystem {
|
hostname,
|
||||||
|
extraModules ? [ ],
|
||||||
|
}:
|
||||||
|
lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [ ./hosts/${hostname}/configuration.nix ] ++ extraModules;
|
||||||
./hosts/marr/configuration.nix
|
|
||||||
#inputs.nixos-hardware.nixosModules.dell-xps-15-9510-nvidia
|
|
||||||
];
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit
|
inherit
|
||||||
inputs
|
inputs
|
||||||
|
@ -41,9 +41,23 @@
|
||||||
system
|
system
|
||||||
lib
|
lib
|
||||||
pkgs
|
pkgs
|
||||||
|
hostname
|
||||||
;
|
;
|
||||||
|
|
||||||
|
username = "nico";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations = {
|
||||||
|
marr = mkSystem {
|
||||||
|
hostname = "marr";
|
||||||
|
extraModules = [
|
||||||
|
#inputs.nixos-hardware.nixosModules.dell-xps-15-9510-nvidia
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
brontes = mkSystem { hostname = "brontes"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells."${system}".default = pkgs.mkShell {
|
devShells."${system}".default = pkgs.mkShell {
|
||||||
|
|
Loading…
Add table
Reference in a new issue