From 21398bece441d9afaa8e74539d993c3e976ebce0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 29 Apr 2024 20:10:36 +0200 Subject: use `nh` as a nixos-rebuild wrapper with nice output --- system/settings/configuration/nix.nix | 3 ++- system/settings/user-interface.nix | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/settings/configuration/nix.nix b/system/settings/configuration/nix.nix index 6b6d51b3..ff870540 100644 --- a/system/settings/configuration/nix.nix +++ b/system/settings/configuration/nix.nix @@ -1,4 +1,5 @@ { config +, lib , pkgs , ... }: { @@ -22,7 +23,7 @@ ''; gc = { - automatic = true; + automatic = lib.mkDefault true; options = "--delete-older-than 14d"; }; }; diff --git a/system/settings/user-interface.nix b/system/settings/user-interface.nix index 915c3ec4..e2784743 100644 --- a/system/settings/user-interface.nix +++ b/system/settings/user-interface.nix @@ -61,6 +61,15 @@ programs.dconf.enable = true; + programs.nh = { + enable = true; + clean = { + enable = true; + extraArgs = "--keep-since 14d"; + }; + }; + nix.gc.automatic = ! config.programs.nh.enable; + imports = [ ./services/xserver.nix ]; -- cgit 1.4.1