Moved user configuration to flake from machine
This commit is contained in:
parent
f341226d0b
commit
a65c4914b7
35
flake.nix
35
flake.nix
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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 = [
|
||||
|
|
Loading…
Reference in New Issue