refactor(treewide)
This commit is contained in:
parent
25d48ac2ac
commit
c4fc882042
99 changed files with 634 additions and 477 deletions
|
|
@ -1,41 +0,0 @@
|
|||
{ lib, config, pkgs, inputs, outputs, self, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ooknet.host.admin;
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
|
||||
{
|
||||
config = {
|
||||
users.users.${cfg.name} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.${cfg.shell};
|
||||
initialPassword = "password";
|
||||
openssh.authorizedKeys.keys = [ "${cfg.sshKey}" ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"video"
|
||||
"audio"
|
||||
] ++ ifTheyExist [
|
||||
"git"
|
||||
"media"
|
||||
"network"
|
||||
"libvirtd"
|
||||
"deluge"
|
||||
"streamer"
|
||||
"torrenter"
|
||||
];
|
||||
};
|
||||
home-manager = mkIf cfg.homeManager {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "hm.old";
|
||||
verbose = true;
|
||||
extraSpecialArgs = { inherit inputs outputs self; };
|
||||
users.${cfg.name} = {
|
||||
imports = [ "${self}/home" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue