2023-06-24 23:00:02 +08:00
|
|
|
{ bootstrape ? false }: inputs:
|
2023-06-09 20:54:03 +08:00
|
|
|
{
|
|
|
|
config =
|
|
|
|
{
|
|
|
|
users.users.chn =
|
|
|
|
{
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = inputs.lib.intersectLists
|
2023-06-19 17:32:59 +08:00
|
|
|
[ "adbusers" "networkmanager" "wheel" "wireshark" "libvirtd" "video" "audio" ]
|
2023-06-09 20:54:03 +08:00
|
|
|
(builtins.attrNames inputs.config.users.groups);
|
|
|
|
shell = inputs.pkgs.zsh;
|
2023-06-19 17:31:34 +08:00
|
|
|
autoSubUidGidRange = true;
|
2023-06-17 21:20:02 +08:00
|
|
|
} // (if bootstrape then { password = "0"; }
|
|
|
|
else { passwordFile = inputs.config.sops.secrets."password/chn".path; });
|
2023-06-16 20:23:08 +08:00
|
|
|
# environment.persistence."/impermanence".users.chn =
|
|
|
|
# {
|
|
|
|
# directories =
|
|
|
|
# [
|
|
|
|
# "Desktop"
|
|
|
|
# "Documents"
|
|
|
|
# "Downloads"
|
|
|
|
# "Music"
|
|
|
|
# "repo"
|
|
|
|
# "Pictures"
|
|
|
|
# "Videos"
|
2023-06-16 15:50:02 +08:00
|
|
|
|
2023-06-16 20:23:08 +08:00
|
|
|
# ".cache"
|
|
|
|
# ".config"
|
|
|
|
# ".gnupg"
|
|
|
|
# ".local"
|
|
|
|
# ".ssh"
|
|
|
|
# ".android"
|
|
|
|
# ".exa"
|
|
|
|
# ".gnome"
|
|
|
|
# ".Mathematica"
|
|
|
|
# ".mozilla"
|
|
|
|
# ".pki"
|
|
|
|
# ".steam"
|
|
|
|
# ".tcc"
|
|
|
|
# ".vim"
|
|
|
|
# ".vscode"
|
|
|
|
# ".Wolfram"
|
|
|
|
# ".zotero"
|
2023-06-16 15:50:02 +08:00
|
|
|
|
2023-06-16 20:23:08 +08:00
|
|
|
# ];
|
|
|
|
# files =
|
|
|
|
# [
|
|
|
|
# ".bash_history"
|
|
|
|
# ".cling_history"
|
|
|
|
# ".gitconfig"
|
|
|
|
# ".gtkrc-2.0"
|
|
|
|
# ".root_hist"
|
|
|
|
# ".viminfo"
|
|
|
|
# ".zsh_history"
|
|
|
|
# ];
|
|
|
|
# };
|
2023-06-17 21:20:02 +08:00
|
|
|
} // (if !bootstrape then { sops.secrets."password/chn".neededForUsers = true; } else {});
|
2023-06-09 20:54:03 +08:00
|
|
|
}
|