mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-24 12:18:46 +08:00
25 lines
784 B
Nix
25 lines
784 B
Nix
inputs:
|
|
{
|
|
config =
|
|
let
|
|
inherit (inputs.lib) mkIf;
|
|
inherit (inputs.config.nixos) users;
|
|
in mkIf (builtins.elem "xll" users.users)
|
|
{
|
|
users.users.xll =
|
|
{
|
|
isNormalUser = true;
|
|
extraGroups = inputs.lib.intersectLists
|
|
[ "groupshare" "video" ]
|
|
(builtins.attrNames inputs.config.users.groups);
|
|
hashedPasswordFile = inputs.config.sops.secrets."users/xll".path;
|
|
openssh.authorizedKeys.keys = [ (builtins.readFile ./id_rsa.pub) ];
|
|
shell = inputs.pkgs.zsh;
|
|
autoSubUidGidRange = true;
|
|
};
|
|
home-manager.users.xll.imports = users.sharedModules;
|
|
sops.secrets."users/xll".neededForUsers = true;
|
|
nixos.services.groupshare.mountPoints = [ "/home/xll/groupshare" ];
|
|
};
|
|
}
|