summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-11-10 06:01:22 +0000
committerGitHub <noreply@github.com>2023-11-10 06:01:22 +0000
commitb55905ceb6e94a992effc7831a55372f913fcd71 (patch)
treea3219888b8bd4a0b01926f1bd0309e8c68b98172 /nixos
parent3f616fad02c82853a8e6e3cf8fd3aea95945f70e (diff)
parentf3565a2c088883636f198550eac349ed82c6a2b3 (diff)
downloadnixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.tar
nixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.tar.gz
nixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.tar.bz2
nixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.tar.lz
nixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.tar.xz
nixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.tar.zst
nixpkgs-b55905ceb6e94a992effc7831a55372f913fcd71.zip
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/security/sudo.nix12
-rw-r--r--nixos/tests/sudo.nix3
2 files changed, 11 insertions, 4 deletions
diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix
index 4e4f186758e..ff912dec507 100644
--- a/nixos/modules/security/sudo.nix
+++ b/nixos/modules/security/sudo.nix
@@ -41,9 +41,15 @@ in
       '';
     };
 
-    enable = mkEnableOption (mdDoc ''
-      the {command}`sudo` command, which allows non-root users to execute commands as root.
-    '');
+    enable = mkOption {
+      type = types.bool;
+      default = true;
+      description =
+        lib.mdDoc ''
+          Whether to enable the {command}`sudo` command, which
+          allows non-root users to execute commands as root.
+        '';
+    };
 
     package = mkPackageOption pkgs "sudo" { };
 
diff --git a/nixos/tests/sudo.nix b/nixos/tests/sudo.nix
index 1b177391488..1fe478f0bff 100644
--- a/nixos/tests/sudo.nix
+++ b/nixos/tests/sudo.nix
@@ -21,7 +21,8 @@ in
         };
 
         security.sudo = {
-          enable = true;
+          # Explicitly _not_ defining 'enable = true;' here, to check that sudo is enabled by default
+
           wheelNeedsPassword = false;
 
           extraConfig = ''