diff --git a/profiles/nixos.nix b/profiles/nixos.nix index 5f95b13..5dedb2d 100644 --- a/profiles/nixos.nix +++ b/profiles/nixos.nix @@ -6,6 +6,21 @@ ... }: { security.sudo.enable = true; + security.sudo.extraRules = [ + { + users = [user]; + commands = [ + { + command = "/run/current-system/sw/bin/nix-env"; + options = ["NOPASSWD"]; + } + { + command = "/nix/store/*/bin/switch-to-configuration"; + options = ["NOPASSWD"]; + } + ]; + } + ]; system.stateVersion = constants.stateVersions.nixos; time.timeZone = "UTC";