From bef60ff74ca12498568d41cffd1f45ed91cf7aa0 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:02:47 +0100 Subject: [PATCH] Change remote execution for rebuild command --- nixos-configurations/server/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nixos-configurations/server/default.nix b/nixos-configurations/server/default.nix index 4668552..c2eae03 100644 --- a/nixos-configurations/server/default.nix +++ b/nixos-configurations/server/default.nix @@ -229,9 +229,17 @@ acceptTerms = true; defaults.email = "thilo.hohlt@tutanota.com"; }; - sudo.extraConfig = '' - %wheel ALL=(ALL) NOPASSWD: ALL, SETENV: ALL - ''; + sudo.extraRules = [ + { + users = [ "thiloho" ]; + commands = [ + { + command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; }; systemd.services = {