1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-09 08:23:52 +00:00
ultima/modules/nixos/hardware/security/default.nix

30 lines
630 B
Nix

{ x, pkgs, lib, config, ... }:
with lib;
with x;
let cfg = config.module.hardware.security;
in {
options = { module.hardware.security = { enable = mkBool; }; };
config = mkIf cfg.enable {
security.sudo-rs = {
execWheelOnly = true;
wheelNeedsPassword = true;
extraRules = [{
users = [ userName ];
commands = with pkgs; [
{
command = "${light}/bin/light";
options = [ "NOPASSWD" ];
}
{
command = "${uutils-coreutils-noprefix}/bin/tee";
options = [ "NOPASSWD" ];
}
];
}];
};
};
}