remove sudo
This commit is contained in:
parent
fa50e20da4
commit
a392b7383e
@ -235,6 +235,7 @@
|
||||
profiles.system = {
|
||||
sshUser = "deploy";
|
||||
user = "root";
|
||||
sudo = "doas -u";
|
||||
fastConnection = true;
|
||||
remoteBuild = false;
|
||||
path = deployPkgs.deploy-rs.lib.activate.nixos self.nixosConfigurations.${name};
|
||||
|
@ -1,21 +1,15 @@
|
||||
{ config, lib, ... }: {
|
||||
# FIXME: completely remove sudo
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
users = [ "deploy" ];
|
||||
commands = [{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}];
|
||||
}];
|
||||
};
|
||||
security.sudo.enable = lib.mkForce false;
|
||||
security.doas = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
users = [ config.mainuser ];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
} {
|
||||
users = [ "deploy" ];
|
||||
noPass = true;
|
||||
keepEnv = true;
|
||||
}] ++ lib.optionals config.deviceSpecific.isLaptop [{
|
||||
users = [ config.mainuser ];
|
||||
noPass = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user