Split system config into tons of modules!
This commit is contained in:
16
system/security/doas.nix
Normal file
16
system/security/doas.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, myName, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Doas instead of sudo
|
||||
security.doas.enable = true;
|
||||
security.sudo.enable = false;
|
||||
security.doas.extraRules = [{
|
||||
users = [ "${myName}" ];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}];
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeScriptBin "sudo" ''exec doas "$@"'')
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user