NH and herdr
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{config, pkgs, ...}:
|
||||
{config, pkgs, herdr, ...}:
|
||||
{
|
||||
imports = [ ./niri.nix ];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
shellAliases = {
|
||||
n = "nvim";
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles";
|
||||
upgrade = "nix flake update --flake ~/nixos-dotfiles && sudo nixos-rebuild switch --flake ~/nixos-dotfiles";
|
||||
upgrade = "nix flake update --flake ~/nixos-dotfiles && { command -v nh > /dev/null 2>&1 && nh os switch ~/nixos-dotfiles || sudo nixos-rebuild switch --flake ~/nixos-dotfiles; }";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
shellAliases = {
|
||||
n = "nvim";
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles";
|
||||
upgrade = "nix flake update --flake ~/nixos-dotfiles && sudo nixos-rebuild switch --flake ~/nixos-dotfiles";
|
||||
upgrade = "nix flake update --flake ~/nixos-dotfiles && { command -v nh &>/dev/null && nh os switch ~/nixos-dotfiles || sudo nixos-rebuild switch --flake ~/nixos-dotfiles; }";
|
||||
tree = "eza --tree --level=2";
|
||||
ls = "eza --icons --all --header --long --git";
|
||||
};
|
||||
@@ -54,7 +54,11 @@
|
||||
bindkey "^[OB" down-line-or-beginning-search
|
||||
|
||||
function gc() {
|
||||
sudo nix-collect-garbage --delete-older-than "''${1:-14}d"
|
||||
if command -v nh &>/dev/null; then
|
||||
nh clean all --keep-since "''${1:-14}d"
|
||||
else
|
||||
sudo nix-collect-garbage --delete-older-than "''${1:-14}d"
|
||||
fi
|
||||
}
|
||||
|
||||
function mkenv() {
|
||||
@@ -261,6 +265,7 @@
|
||||
# ── Packages ─────────────────────────────────────────────────────────────────
|
||||
home.packages = with pkgs; [
|
||||
# general
|
||||
herdr.packages.${pkgs.system}.default # wallpaper manager
|
||||
claude-code # ai coding assistant
|
||||
azure-cli # az cli
|
||||
git-credential-manager # git credential helper (azure devops PAT)
|
||||
@@ -270,6 +275,7 @@
|
||||
jq # json processor
|
||||
powershell # yes
|
||||
teams-for-linux # teams
|
||||
nh # nix helper
|
||||
unzip # compression
|
||||
|
||||
# terminal
|
||||
|
||||
Reference in New Issue
Block a user