about summary refs log tree commit diff
path: root/nixos/modules/security
diff options
context:
space:
mode:
authornicoo <nicoo@mur.at>2023-10-26 01:16:35 +0000
committernicoo <nicoo@mur.at>2023-11-25 14:11:24 +0000
commit46aaa5be70b55a8cf2a8599338e67a841a1d3763 (patch)
treec3d7523de63fa94dfce8c6ced5b9a464aa99e290 /nixos/modules/security
parent03db94319af0d0c9bab329f9db33e62d916127c8 (diff)
nixos/sudo-rs: Refactor option definitions
Diffstat (limited to 'nixos/modules/security')
-rw-r--r--nixos/modules/security/sudo-rs.nix20
1 files changed, 4 insertions, 16 deletions
diff --git a/nixos/modules/security/sudo-rs.nix b/nixos/modules/security/sudo-rs.nix
index 1c1cc32fa79ed..48fb56a046af8 100644
--- a/nixos/modules/security/sudo-rs.nix
+++ b/nixos/modules/security/sudo-rs.nix
@@ -41,23 +41,11 @@ in
       '';
     };
 
-    enable = mkOption {
-      type = types.bool;
-      default = false;
-      description = mdDoc ''
-        Whether to enable the {command}`sudo` command, which
-        allows non-root users to execute commands as root.
-      '';
-    };
+    enable = mkEnableOption (mdDoc ''
+      the {command}`sudo` command, which allows non-root users to execute commands as root.
+    '');
 
-    package = mkOption {
-      type = types.package;
-      default = pkgs.sudo-rs;
-      defaultText = literalExpression "pkgs.sudo-rs";
-      description = mdDoc ''
-        Which package to use for `sudo`.
-      '';
-    };
+    package = mkPackageOption pkgs "sudo-rs" { };
 
     wheelNeedsPassword = mkOption {
       type = types.bool;