Remove sudo
This commit is contained in:
parent
ef572c20bc
commit
ad71bb0318
5 changed files with 27 additions and 6 deletions
|
@ -11,6 +11,7 @@
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
group = "users";
|
group = "users";
|
||||||
};
|
};
|
||||||
|
security.sudo.enable = false;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
permitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
|
|
|
@ -70,6 +70,14 @@ in
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
security.doas.extraRules = [{
|
||||||
|
users = [ "charlotte" ];
|
||||||
|
noPass = true;
|
||||||
|
cmd = "accentor-console";
|
||||||
|
runAs = "accentor";
|
||||||
|
setEnv = [ "RAILS_MASTER_KEY" ];
|
||||||
|
}];
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = "${config.chvp.dataPrefix}/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
|
dataDir = "${config.chvp.dataPrefix}/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||||
|
|
|
@ -89,6 +89,19 @@
|
||||||
externalInterface = "eno3";
|
externalInterface = "eno3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.sudo.enable = false;
|
||||||
|
security.doas = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
users = [ "charlotte" ];
|
||||||
|
noPass = true;
|
||||||
|
cmd = "nix-collect-garbage";
|
||||||
|
runAs = "root";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
|
@ -97,7 +110,7 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/charlotte";
|
home = "/home/charlotte";
|
||||||
description = "Charlotte Van Petegem";
|
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" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
"extract"
|
"extract"
|
||||||
"history-substring-search"
|
"history-substring-search"
|
||||||
"git"
|
"git"
|
||||||
"sudo"
|
|
||||||
"systemd"
|
"systemd"
|
||||||
"tmux"
|
"tmux"
|
||||||
];
|
];
|
||||||
|
@ -50,8 +49,8 @@
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
lib.mkIf config.chvp.zsh.enable {
|
lib.mkIf config.chvp.zsh.enable {
|
||||||
chvp.zfs.systemLinks = [ { path = "/root/.local/share/autojump"; type = "cache"; } ];
|
chvp.zfs.systemLinks = [{ path = "/root/.local/share/autojump"; type = "cache"; }];
|
||||||
chvp.zfs.homeLinks = [ { path = ".local/share/autojump"; type = "cache"; } ];
|
chvp.zfs.homeLinks = [{ path = ".local/share/autojump"; type = "cache"; }];
|
||||||
home-manager.users.charlotte = { ... }: (base "/home/charlotte");
|
home-manager.users.charlotte = { ... }: (base "/home/charlotte");
|
||||||
home-manager.users.root = { ... }: (base "/root");
|
home-manager.users.root = { ... }: (base "/root");
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ nix flake update --recreate-lock-file
|
||||||
|
|
||||||
if [ -z "${OVERRIDE:-}" ]
|
if [ -z "${OVERRIDE:-}" ]
|
||||||
then
|
then
|
||||||
sudo nixos-rebuild --flake . switch
|
su -c "nixos-rebuild --flake . switch"
|
||||||
else
|
else
|
||||||
sudo nixos-rebuild --flake . --override-input nixpkgs ../nixpkgs --no-write-lock-file switch
|
su -c "nixos-rebuild --flake . --override-input nixpkgs ../nixpkgs --no-write-lock-file switch"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue