diff --git a/modules/beatific.nix b/modules/beatific.nix index 0eadd72..d4a758c 100644 --- a/modules/beatific.nix +++ b/modules/beatific.nix @@ -53,8 +53,15 @@ in { # Options to always set networking.hostName = cfg.hostName; nix.extraOptions = "experimental-features = nix-command flakes"; + # Link /etc/nixos to the flake source environment.etc.nixos.source = ./..; - environment.shellAliases.nr = "sudo nixos-rebuild --flake $HOME/nixos-configs"; + environment.shellAliases = { + # Shortcut for nixos-rebuild + nr = "sudo nixos-rebuild --flake $HOME/nixos-configs"; + # Set some user-friendly defaults (use e.g. "command cp" to skip the alias) + # -r (recursively copy dirs) -p (preserve mode, ownership, timestamps) + cp = "cp -rp"; + }; security.sudo.extraRules = [{ users = [ "tvb" ]; commands = [ { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" ]; } ];