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
baseModules = [
home-manager.nixosModules.home-manager
{
home-manager.sharedModules = [
stylix.homeManagerModules.stylix
nixvim.homeManagerModules.nixvim
nur.modules.homeManager.default
makeConfig =
machineConfig: userConfig:
(nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
machineConfig
home-manager.nixosModules.home-manager
{
machine.users = userConfig;
home-manager.sharedModules = [
stylix.homeManagerModules.stylix
nixvim.homeManagerModules.nixvim
nur.modules.homeManager.default
];
}
];
}
];
});
in
{
nixosConfigurations = {
"20212060" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./machines/laptop.nix
] ++ baseModules;
"20212060" = makeConfig ./machines/laptop.nix {
jan = {
sudo = true;
configuration = ./users/jan.nix;
};
};
};
};

View File

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