1
1
Fork 0

beatific: alias cp to -rp

This commit is contained in:
Jaculabilis 2024-01-04 20:55:43 +00:00
parent fa46c83f46
commit ba3c46b8f4
1 changed files with 8 additions and 1 deletions

View File

@ -53,8 +53,15 @@ in {
# Options to always set # Options to always set
networking.hostName = cfg.hostName; networking.hostName = cfg.hostName;
nix.extraOptions = "experimental-features = nix-command flakes"; nix.extraOptions = "experimental-features = nix-command flakes";
# Link /etc/nixos to the flake source
environment.etc.nixos.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 = [{ security.sudo.extraRules = [{
users = [ "tvb" ]; users = [ "tvb" ];
commands = [ { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" ]; } ]; commands = [ { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" ]; } ];