2023-11-04 10:02:11 +00:00
|
|
|
{
|
2023-11-04 10:14:42 +00:00
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2023-11-04 10:02:11 +00:00
|
|
|
users.users."guanranwang" = {
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Guanran Wang";
|
|
|
|
extraGroups = [
|
2023-11-04 10:14:42 +00:00
|
|
|
"wheel" # administrator
|
|
|
|
"networkmanager" # access to networkmanager
|
|
|
|
"tss" # access to tpm devices
|
|
|
|
"vboxusers" # access to virtualbox
|
2023-11-04 10:02:11 +00:00
|
|
|
"nix-access-tokens" # access to github tokens
|
2023-11-08 15:58:02 +00:00
|
|
|
"libvirtd" # access to virt-manager
|
2023-11-04 10:02:11 +00:00
|
|
|
];
|
|
|
|
hashedPasswordFile = config.sops.secrets."hashed-passwd".path;
|
|
|
|
shell = pkgs.fish;
|
|
|
|
packages = [];
|
|
|
|
};
|
|
|
|
|
2023-11-09 03:51:35 +00:00
|
|
|
programs.fish.enable = true;
|
2023-12-10 05:55:07 +00:00
|
|
|
users.groups."nix-access-tokens" = {};
|
|
|
|
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
2023-11-17 05:38:25 +00:00
|
|
|
|
2023-11-04 10:02:11 +00:00
|
|
|
### sops-nix
|
|
|
|
sops = {
|
2023-11-17 05:38:25 +00:00
|
|
|
defaultSopsFile = ../../../secrets/secrets.yaml;
|
2023-11-23 06:23:03 +00:00
|
|
|
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
2023-11-04 10:02:11 +00:00
|
|
|
gnupg.sshKeyPaths = [];
|
|
|
|
secrets = {
|
2023-12-10 05:55:07 +00:00
|
|
|
"hashed-passwd" = {
|
|
|
|
neededForUsers = true;
|
|
|
|
};
|
2023-11-04 10:02:11 +00:00
|
|
|
"nix-access-tokens" = {
|
|
|
|
group = config.users.groups."nix-access-tokens".name;
|
|
|
|
mode = "0440";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-11-14 03:22:17 +00:00
|
|
|
|
|
|
|
### home-manager
|
2023-12-10 05:55:07 +00:00
|
|
|
home-manager.users.guanranwang = import ./home;
|
2023-11-04 10:14:42 +00:00
|
|
|
}
|