nixos/modules/users/xll/default.nix

27 lines
843 B
Nix
Raw Normal View History

2023-11-19 17:15:44 +08:00
inputs:
{
config =
let
inherit (inputs.lib) mkIf;
inherit (inputs.config.nixos) users;
in mkIf (builtins.elem "xll" users.users)
{
users.users.xll =
{
extraGroups = inputs.lib.intersectLists
2024-03-03 19:15:04 +08:00
[ "users" "groupshare" "video" ]
2023-11-19 17:15:44 +08:00
(builtins.attrNames inputs.config.users.groups);
2023-11-23 02:04:47 +08:00
hashedPasswordFile = inputs.config.sops.secrets."users/xll".path;
2023-11-19 17:15:44 +08:00
openssh.authorizedKeys.keys = [ (builtins.readFile ./id_rsa.pub) ];
shell = inputs.pkgs.zsh;
autoSubUidGidRange = true;
};
2024-03-11 16:30:24 +08:00
home-manager.users.xll = homeInputs:
2024-03-11 15:32:37 +08:00
{
imports = users.sharedModules;
2024-03-11 16:30:24 +08:00
config.home.file.groupshare.source = homeInputs.config.lib.file.mkOutOfStoreSymlink "/var/lib/groupshare";
2024-03-11 15:32:37 +08:00
};
2023-11-19 17:15:44 +08:00
sops.secrets."users/xll".neededForUsers = true;
};
}