Remove sudo

This commit is contained in:
Charlotte Van Petegem 2021-01-27 16:57:07 +01:00
parent ef572c20bc
commit ad71bb0318
No known key found for this signature in database
GPG key ID: 019E764B7184435A
5 changed files with 27 additions and 6 deletions

View file

@ -70,6 +70,14 @@ in
'')
];
security.doas.extraRules = [{
users = [ "charlotte" ];
noPass = true;
cmd = "accentor-console";
runAs = "accentor";
setEnv = [ "RAILS_MASTER_KEY" ];
}];
services.postgresql = {
enable = true;
dataDir = "${config.chvp.dataPrefix}/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";

View file

@ -89,6 +89,19 @@
externalInterface = "eno3";
};
security.sudo.enable = false;
security.doas = {
enable = true;
extraRules = [
{
users = [ "charlotte" ];
noPass = true;
cmd = "nix-collect-garbage";
runAs = "root";
}
];
};
users = {
mutableUsers = false;
defaultUserShell = pkgs.zsh;
@ -97,7 +110,7 @@
isNormalUser = true;
home = "/home/charlotte";
description = "Charlotte Van Petegem";
extraGroups = [ "wheel" "systemd-journal" ] ++ lib.optionals config.chvp.graphical [ "input" "video" ];
extraGroups = [ "systemd-journal" ] ++ lib.optionals config.chvp.graphical [ "input" "video" ];
};
};
};

View file

@ -30,7 +30,6 @@
"extract"
"history-substring-search"
"git"
"sudo"
"systemd"
"tmux"
];
@ -50,8 +49,8 @@
});
in
lib.mkIf config.chvp.zsh.enable {
chvp.zfs.systemLinks = [ { path = "/root/.local/share/autojump"; type = "cache"; } ];
chvp.zfs.homeLinks = [ { path = ".local/share/autojump"; type = "cache"; } ];
chvp.zfs.systemLinks = [{ path = "/root/.local/share/autojump"; type = "cache"; }];
chvp.zfs.homeLinks = [{ path = ".local/share/autojump"; type = "cache"; }];
home-manager.users.charlotte = { ... }: (base "/home/charlotte");
home-manager.users.root = { ... }: (base "/root");
};