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