From aab13ebe268c17e7457af028a68bd6904126747c Mon Sep 17 00:00:00 2001 From: KnightArtorias Date: Fri, 26 Dec 2025 23:29:29 +0000 Subject: [PATCH] Adjust update alias to do a flake update before rebuild upgrade --- nixos/common/default.nix | 6 ++++++ nixos/modules/zsh.nix | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/common/default.nix b/nixos/common/default.nix index c33f648..74f7da7 100644 --- a/nixos/common/default.nix +++ b/nixos/common/default.nix @@ -21,5 +21,11 @@ dig traceroute ]; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; } diff --git a/nixos/modules/zsh.nix b/nixos/modules/zsh.nix index da04a6e..e2b9a90 100644 --- a/nixos/modules/zsh.nix +++ b/nixos/modules/zsh.nix @@ -26,7 +26,7 @@ shellAliases = { ll = "ls -la"; - update = "sudo nixos-rebuild switch --upgrade-all --flake $NIX_FLAKE_PATH#${vars.hostName}"; + update = "nix flake update $NIX_FLAE_PATH#${vars.hostName} && sudo nixos-rebuild switch --upgrade-all --flake $NIX_FLAKE_PATH#${vars.hostName}"; rebuild = "sudo nixos-rebuild switch --flake $NIX_FLAKE_PATH#${vars.hostName}"; }; };