xin/configs/doas.nix

29 lines
493 B
Nix
Raw Normal View History

2023-07-11 09:12:50 -06:00
{
config,
lib,
...
}:
2022-08-25 12:21:35 -06:00
with lib; {
options = {
2023-07-11 09:12:50 -06:00
doas = {enable = mkEnableOption "Enable doas for priv-escie";};
2022-08-25 12:21:35 -06:00
};
config = mkIf config.doas.enable {
nixpkgs.config.packageOverrides = pkgs: {
2023-07-11 09:12:50 -06:00
doas = pkgs.doas.override {withPAM = false;};
2022-08-25 12:21:35 -06:00
};
security = {
doas = {
enable = true;
2023-07-11 09:12:50 -06:00
extraRules = [
{
groups = ["wheel"];
persist = true;
}
];
2022-08-25 12:21:35 -06:00
};
sudo.enable = false;
};
};
}