rewrite
This commit is contained in:
35
modules/common/users.nix
Normal file
35
modules/common/users.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.users.phoenix = {
|
||||
isNormalUser = true;
|
||||
description = "Phoenix";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.bash;
|
||||
home = "/home/phoenix";
|
||||
createHome = true;
|
||||
useDefaultShell = true;
|
||||
};
|
||||
|
||||
users.users.deploy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
home = "/home/deploy";
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "phoenix" ];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
nix.settings.trusted-users = [ "root" "@wheel" ];
|
||||
}
|
||||
Reference in New Issue
Block a user