re-add init function for home manager

my stupid ass in b979657 thought that
home-manager.nixosModules.home-manager was a function that returned a
module instead of just a module (which is also a function but that's
besides the point). i forgot to consider that the home-manager module
adds a custom home-manager option set, nor did i realize that a flake
module could be a plain attribute set.
This commit is contained in:
NullBite 2024-01-12 11:30:59 +01:00
parent ab7b0e1de5
commit 531445e1f0
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -16,10 +16,13 @@
let
lib = nixpkgs.lib;
username = "nullbite";
hmModule = inputs.home-manager.nixosModules.home-manager;
hmModuleDefaults = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
homeManagerModule = inputs.home-manager.nixosModules.home-manager;
homeManagerInit = user: module: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = module;
};
};
in {
# for repl debugging via :lf .
@ -39,9 +42,8 @@
./system/fragments/opengl.nix
./system/gaming.nix
# ./system/hyprland.nix
hmModule (hmModuleDefaults // {
home-manager.users."${username}" = import ./hosts/slab/home.nix;
})
homeManagerModule
(homeManagerInit username (import ./hosts/slab/home.nix))
];
};
nullbox = lib.nixosSystem {
@ -52,11 +54,8 @@
./system/plasma.nix
./system/fragments/hardware/nvidia-modeset.nix
./system/gaming.nix
hmModule (hmModuleDefaults // {
home-manager.users."${username}" = import ./hosts/nullbox/home.nix;
})
homeManagerModule
(homeManagerInit username (import ./hosts/nullbox/home.nix))
];
};
};