From bd3775074950864ec91763672031f29bf8729ffc Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sat, 13 Apr 2024 00:28:25 +0200 Subject: [PATCH] Add rebuild alias --- home/programs/terminal/shell/zsh/aliases.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/home/programs/terminal/shell/zsh/aliases.nix b/home/programs/terminal/shell/zsh/aliases.nix index 2a1aa7a..2abf7c9 100644 --- a/home/programs/terminal/shell/zsh/aliases.nix +++ b/home/programs/terminal/shell/zsh/aliases.nix @@ -1,6 +1,6 @@ -{ config, ... }: +{ config, pkgs, lib, ... }: let - username = config.myOptions.system.username; + nr = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; in { programs.zsh.shellAliases = { @@ -30,6 +30,9 @@ in rrf = "rm -rf"; vimdiff = "nvim -d"; + # Nix aliases + rebuild = "nix-store --verify; pushd ~/dots; ${nr} switch --flake .#$1 --use-remote-sudo ; popd"; + # Expand aliases from sudo sudo = "sudo "; };