From 5f17decfe8e4ab658d3f805b28d414b2bcaca044 Mon Sep 17 00:00:00 2001 From: fruchti Date: Sat, 11 Mar 2023 10:28:59 +0100 Subject: [PATCH] Allow nixos-rebuild without password for wheel --- base/users.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/base/users.nix b/base/users.nix index c897d36..bcffc2e 100644 --- a/base/users.nix +++ b/base/users.nix @@ -16,4 +16,16 @@ in members = [ "fruchti" ]; }; }; + + security.sudo.extraRules = [ + { + groups = [ "wheel" ]; + commands = [ + { + command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild *"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; }