diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..1c3ce87 --- /dev/null +++ b/Justfile @@ -0,0 +1,25 @@ +deploy: + nixos-rebuild switch --flake . + +debug: + nixos-rebuild switch --flake . --show-trace --verbose + +up: + nix flake update + +# Update specific input +# usage: make upi i=home-manager +upi: + nix flake update $(i) + +history: + nix profile history --profile /nix/var/nix/profiles/system + +repl: + nix repl -f flake:nixpkgs + +clean: + sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d + +gc: + sudo nix-collect-garbage --delete-old diff --git a/hosts/dnsc-server/configuration.nix b/hosts/dnsc-server/configuration.nix index 0a8343b..ed64171 100644 --- a/hosts/dnsc-server/configuration.nix +++ b/hosts/dnsc-server/configuration.nix @@ -19,6 +19,16 @@ # Boot boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.configurationLimit = 10; + + # Nix Settings + # Perform garbage collection weekly to maintain low disk usage + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 1w"; + }; + nix.settings.auto-optimise-store = true; # Networking networking.hostName = "dnsc-server"; diff --git a/hosts/dnsc-server/home.nix b/hosts/dnsc-server/home.nix index 00927b4..6bb6c6f 100644 --- a/hosts/dnsc-server/home.nix +++ b/hosts/dnsc-server/home.nix @@ -13,6 +13,7 @@ fzf iotop iftop + just ]; programs.home-manager.enable = true;