xin/configs/doas.nix

24 lines
468 B
Nix
Raw Normal View History

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