diff --git a/hosts/snowbelle/configuration.nix b/hosts/snowbelle/configuration.nix index ad92c6b..8f9fe96 100644 --- a/hosts/snowbelle/configuration.nix +++ b/hosts/snowbelle/configuration.nix @@ -27,6 +27,20 @@ # enable user users.blake.enable = true; + # passwordless rebuild + security.sudo.extraRules = [ + { + users = [ "blake" ]; + commands = [ + { + command = "${config.system.build.nixos-rebuild}"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; + + # use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/users/blake/blake.nix b/users/blake/blake.nix index ac80e53..8aa1c53 100644 --- a/users/blake/blake.nix +++ b/users/blake/blake.nix @@ -13,9 +13,9 @@ }; - config = lib.mkIf config.blake.enable { + config = lib.mkIf config.users.blake.enable { # create blake user - users.users.${config.blake.username} = { + users.users.${config.users.blake.username} = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "docker" ]; # Enable ‘sudo’ for the user. shell = pkgs.zsh;