[NixOS] Add users.nix

This commit is contained in:
Ivan Malison 2021-07-10 15:27:14 -06:00
parent 72f7361ba9
commit 42a568eba1
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

39
nixos/users.nix Normal file
View File

@ -0,0 +1,39 @@
{ pkgs }:
{
security.sudo.wheelNeedsPassword = false;
users.extraUsers = let
extraGroups = [
"audio"
"adbusers"
"disk"
"docker"
"networkmanager"
"plugdev"
"systemd-journal"
"video"
"wheel"
];
userDefaults = {
inherit extraGroups;
group = "users";
isNormalUser = true;
createHome = true;
shell = pkgs.zsh;
};
in {
imalison = userDefaults // {
name = "imalison";
uid = 1000;
home = "/home/imalison";
shell = pkgs.zsh;
};
kat = userDefaults // {
name = "kat";
uid = 1001;
home = "/home/kat";
shell = pkgs.zsh;
};
};
nix.trustedUsers = ["imalison" "kat"];
}