base: move home-manager options out of admin module
This commit is contained in:
parent
96f277122f
commit
8a165354f9
3 changed files with 28 additions and 10 deletions
|
|
@ -20,6 +20,8 @@ in {
|
||||||
shell = pkgs.${admin.shell};
|
shell = pkgs.${admin.shell};
|
||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
openssh.authorizedKeys.keys = [keys.users."${admin.name}"];
|
openssh.authorizedKeys.keys = [keys.users."${admin.name}"];
|
||||||
|
createHome = true;
|
||||||
|
home = "/home/${admin.name}";
|
||||||
extraGroups =
|
extraGroups =
|
||||||
[
|
[
|
||||||
"wheel"
|
"wheel"
|
||||||
|
|
@ -35,15 +37,5 @@ in {
|
||||||
"torrenter"
|
"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"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
./home-manager.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./admin.nix
|
./admin.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
|
|
|
||||||
25
modules/nixos/base/home-manager.nix
Normal file
25
modules/nixos/base/home-manager.nix
Normal 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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue