refactor: move system creation to function

This commit is contained in:
Nydragon 2024-06-25 14:46:50 +02:00
parent f2e1e9c5d2
commit bb7342d876
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209

View file

@ -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 {