dots/hosts/orion/modules/users.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2024-06-17 20:26:17 -05:00
{
pkgs,
config,
lib,
...
}:
2024-05-03 14:35:00 -05:00
{
security.sudo.wheelNeedsPassword = false;
users.groups.price = { };
2024-05-29 01:05:01 -05:00
users.mutableUsers = false;
2024-05-03 14:35:00 -05:00
users.users = {
root.hashedPasswordFile = config.age.secrets.users-root-pw.path;
price = {
isNormalUser = true;
2024-06-02 12:56:44 -05:00
extraGroups = [
"wheel"
"keyd"
2024-06-17 20:26:17 -05:00
(lib.mkIf config.virtualisation.docker.enable "docker")
(lib.mkIf config.virtualisation.libvirtd.enable "libvirtd")
2024-06-02 12:56:44 -05:00
];
2024-05-03 14:35:00 -05:00
group = "price";
shell = pkgs.zsh;
createHome = true;
hashedPasswordFile = config.age.secrets.users-price-pw.path;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOkWsSntg1ufF40cALcIBA7WZhiU/f0cncqq0pcp+DZY openpgp:0x15993C90"
];
};
};
environment.persistence.ephemeral.directories = [
{
directory = "/home/price";
user = "price";
group = "${config.users.users.price.group}";
mode = "${config.users.users.price.homeMode}";
}
];
environment.persistence.ephemeral.users = {
root = {
home = (config.users.users.root.home);
files = [ ".bash_history" ];
};
};
2024-06-02 12:56:44 -05:00
}