xin/configs/doas.nix

26 lines
493 B
Nix
Raw Normal View History

2024-02-18 12:23:08 -07:00
{ config, lib, ... }:
with lib;
{
2022-08-25 12:21:35 -06:00
options = {
2024-02-18 12:23:08 -07:00
doas = {
enable = mkEnableOption "Enable doas for priv-escie";
};
2022-08-25 12:21:35 -06:00
};
config = mkIf config.doas.enable {
2024-02-18 12:23:08 -07:00
nixpkgs.config.packageOverrides = pkgs: { 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 = [
{
2023-09-12 08:44:05 -06:00
groups = [ "wheel" ];
2023-07-11 09:12:50 -06:00
persist = true;
}
];
2022-08-25 12:21:35 -06:00
};
sudo.enable = false;
};
};
}