users: add deploy
This commit is contained in:
parent
2a096e3d0d
commit
cded5bfdf7
2 changed files with 29 additions and 0 deletions
|
|
@ -52,6 +52,7 @@
|
||||||
|
|
||||||
./modules/users/nico.nix
|
./modules/users/nico.nix
|
||||||
./modules/users/alex.nix
|
./modules/users/alex.nix
|
||||||
|
./modules/users/deploy.nix
|
||||||
./modules/hardware/secureboot.nix
|
./modules/hardware/secureboot.nix
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
|
|
|
||||||
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