Move modules out of config function

This commit is contained in:
Manuel Thalmann 2024-06-12 01:35:30 +02:00
parent 9fa02af3a3
commit ff48b4e3c6
2 changed files with 4 additions and 4 deletions

View file

@ -19,6 +19,7 @@
defaultMachine = { defaultMachine = {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ];
config = { pkgs, ... }: { config = { pkgs, ... }: {
dualBoot = false; dualBoot = false;
@ -26,7 +27,6 @@
keyMap = "us"; keyMap = "us";
keyboardLayout = "us"; keyboardLayout = "us";
localeSettings = { }; localeSettings = { };
modules = [ ];
users = { }; users = { };
}; };
}; };
@ -102,7 +102,7 @@
) // { ) // {
nixosConfigurations = nixosConfigurations =
builtins.mapAttrs ( builtins.mapAttrs (
hostname: { system, config }@machine: nixpkgs.lib.nixosSystem { hostname: { system, config, modules }@machine: nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
@ -125,7 +125,7 @@
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
./lib/configuration.nix ./lib/configuration.nix
(tryFiles [ ./lib/machines/${hostname}.nix ] ./lib/hardware/base.nix) (tryFiles [ ./lib/machines/${hostname}.nix ] ./lib/hardware/base.nix)
]; ] ++ modules;
}) })
machines; machines;

View file

@ -5,7 +5,7 @@
./modules/my-users.nix ./modules/my-users.nix
./modules/sddm.nix ./modules/sddm.nix
./modules/unfree.nix ./modules/unfree.nix
] ++ machine.modules; ];
config = { config = {
system.stateVersion = "23.11"; system.stateVersion = "23.11";