From 95ff96736305773c719aabe5771c70a9c884b8f3 Mon Sep 17 00:00:00 2001 From: EinEtwas Date: Wed, 20 Nov 2024 11:01:56 +0100 Subject: [PATCH] feat(zsh): prune saved nix configs in bootloader on each call of os-update or os-upgrade --- home/essentials/zsh.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/essentials/zsh.nix b/home/essentials/zsh.nix index f7c94e2..4d0ccc5 100644 --- a/home/essentials/zsh.nix +++ b/home/essentials/zsh.nix @@ -7,8 +7,8 @@ autocd = true; shellAliases = { - os-update = "nh os switch /home/rhea/nix-config/"; - os-upgrade = "cd ~/nix-config && nix flake update && nh os switch /home/rhea/nix-config/"; + os-update = "sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +15 && nh os switch /home/rhea/nix-config/"; + os-upgrade = "cd ~/nix-config && sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +15 && nix flake update && nh os switch /home/rhea/nix-config/"; light-off = "echo -n \"{\\\"id\\\":1,\\\"method\\\":\\\"setState\\\",\\\"params\\\":{\\\"state\\\":false}}\" | nc -u -w 1 192.168.178.28 38899"; clr = "clear"; power-saver = "powerprofilesctl set power-saver";