mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 15:15:52 +05:30
17 lines
322 B
Nix
17 lines
322 B
Nix
{ 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 "$@"'')
|
|
];
|
|
}
|