base: move home-manager options out of admin module

This commit is contained in:
ooks-io 2024-10-27 23:15:42 +11:00
parent 96f277122f
commit 8a165354f9
3 changed files with 28 additions and 10 deletions

View file

@ -20,6 +20,8 @@ in {
shell = pkgs.${admin.shell};
initialPassword = "password";
openssh.authorizedKeys.keys = [keys.users."${admin.name}"];
createHome = true;
home = "/home/${admin.name}";
extraGroups =
[
"wheel"
@ -35,15 +37,5 @@ in {
"torrenter"
];
};
home-manager = mkIf (role == "workstation" || admin.homeManager) {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "hm.old";
verbose = true;
extraSpecialArgs = {inherit inputs inputs' self self';};
users.${admin.name} = {
imports = ["${self}/modules/home/base"];
};
};
};
}

View file

@ -1,6 +1,7 @@
{
imports = [
./nix.nix
./home-manager.nix
./boot.nix
./admin.nix
./locale.nix

View file

@ -0,0 +1,25 @@
{
inputs,
inputs',
self,
self',
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config.ooknet.host) admin;
in {
config = mkIf admin.homeManager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "hm.old";
verbose = true;
extraSpecialArgs = {inherit inputs inputs' self self';};
users.${admin.name} = {
imports = ["${self}/modules/home/base"];
};
};
};
}