Moved user configuration to flake from machine

This commit is contained in:
Jan-Bulthuis 2025-01-24 02:38:09 +01:00
parent f341226d0b
commit a65c4914b7
2 changed files with 21 additions and 20 deletions

View File

@ -25,24 +25,31 @@
... ...
}: }:
let let
baseModules = [ makeConfig =
home-manager.nixosModules.home-manager machineConfig: userConfig:
{ (nixpkgs.lib.nixosSystem {
home-manager.sharedModules = [ system = "x86_64-linux";
stylix.homeManagerModules.stylix modules = [
nixvim.homeManagerModules.nixvim machineConfig
nur.modules.homeManager.default home-manager.nixosModules.home-manager
{
machine.users = userConfig;
home-manager.sharedModules = [
stylix.homeManagerModules.stylix
nixvim.homeManagerModules.nixvim
nur.modules.homeManager.default
];
}
]; ];
} });
];
in in
{ {
nixosConfigurations = { nixosConfigurations = {
"20212060" = nixpkgs.lib.nixosSystem { "20212060" = makeConfig ./machines/laptop.nix {
system = "x86_64-linux"; jan = {
modules = [ sudo = true;
./machines/laptop.nix configuration = ./users/jan.nix;
] ++ baseModules; };
}; };
}; };
}; };

View File

@ -22,12 +22,6 @@
wpa_supplicant.enable = true; wpa_supplicant.enable = true;
}; };
# User accounts
machine.users.jan = {
sudo = true;
configuration = ../users/jan.nix;
};
# Hardware configuration # Hardware configuration
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [