users: add deploy
This commit is contained in:
parent
2a096e3d0d
commit
cded5bfdf7
2 changed files with 29 additions and 0 deletions
28
modules/users/deploy.nix
Normal file
28
modules/users/deploy.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
users.users.deploy = {
|
||||
isNormalUser = true;
|
||||
home = "/var/empty";
|
||||
group = "deploy";
|
||||
};
|
||||
|
||||
users.groups.deploy = {};
|
||||
|
||||
users.users.deploy.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILXwl+UyfeN/9M/z21mlVS3guYEqIjtgAf5pCPkjXhR0"
|
||||
];
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "deploy" ];
|
||||
runAs = "root";
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue