summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-02-11 11:17:14 +0100
committerJasper Ras <jras@hostnet.nl>2025-02-11 11:17:14 +0100
commit1a088c385a74badd9f60dd90db43bf50540d4526 (patch)
treeddc4c564e5381c14e115fa5ec88b9426717688a0
parent832479d3fd4b9352bef2192705ec2f9d7b435fd2 (diff)
Dont allow passwordless sudo on work host :)
-rw-r--r--configuration/core/users.nix4
-rw-r--r--configuration/work/default.nix3
2 files changed, 4 insertions, 3 deletions
diff --git a/configuration/core/users.nix b/configuration/core/users.nix
index ec12a9f..b1a30ed 100644
--- a/configuration/core/users.nix
+++ b/configuration/core/users.nix
@@ -2,8 +2,8 @@
{
programs.zsh.enable = true;
- security.sudo.execWheelOnly = true;
- security.sudo.wheelNeedsPassword = false;
+ security.sudo.execWheelOnly = lib.mkDefault true;
+ security.sudo.wheelNeedsPassword = lib.mkDefault false;
users.users.jras = {
createHome = true;
diff --git a/configuration/work/default.nix b/configuration/work/default.nix
index 322f5bf..5c94b84 100644
--- a/configuration/work/default.nix
+++ b/configuration/work/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ lib, pkgs, ... }:
{
imports = [
../core
@@ -13,6 +13,7 @@
system.stateVersion = "24.05"; # Do NOT change before reading configuration.nix
users.users.jras.extraGroups = [ "networkmanager" "docker" ];
+ security.sudo.wheelNeedsPassword = lib.mkForce true;
time.timeZone = "Europe/Amsterdam";