diff --git a/users/users.nix b/users/users.nix index 7763140..77855c4 100644 --- a/users/users.nix +++ b/users/users.nix @@ -6,4 +6,21 @@ openssh.authorizedKeys.keyFiles = [ ./bates64.pub ]; }; }; + + security.sudo.extraRules = [ + { + users = [ "bates64" ]; + commands = [ + { + command = "/run/current-system/sw/bin/nixos-rebuild"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; + + nix.settings.trusted-users = [ + "root" + "bates64" + ]; }