From 9311458bbd7a8c078d7b26cb6e91d404963fd54f Mon Sep 17 00:00:00 2001 From: scriptis Date: Mon, 17 Feb 2025 20:49:37 -0600 Subject: [PATCH 1/4] enable nix auto gc and optimise --- modules/base.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/base.nix b/modules/base.nix index 8f7d6d7..493e8f7 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -89,6 +89,12 @@ security.sudo.wheelNeedsPassword = false; + nix.gc.automatic = true; + nix.gc.dates = "daily"; + + nix.optimise.automatic = true; + nix.optimise.dates = "daily"; + programs.git = { enable = true; lfs.enable = true; From aabbab64367393ce942582d58e336c8d18afe47e Mon Sep 17 00:00:00 2001 From: scriptis Date: Mon, 17 Feb 2025 20:54:21 -0600 Subject: [PATCH 2/4] `list of string` neq `list or string` --- modules/base.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index 493e8f7..88e7350 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -89,11 +89,16 @@ security.sudo.wheelNeedsPassword = false; - nix.gc.automatic = true; - nix.gc.dates = "daily"; - - nix.optimise.automatic = true; - nix.optimise.dates = "daily"; + nix = { + gc = { + automatic = true; + dates = ["daily"]; + }; + optimise = { + automatic = true; + dates = ["daily"]; + }; + }; programs.git = { enable = true; From 1f013b070091357ef2bbe3ac3926ce9cdf1c1eb0 Mon Sep 17 00:00:00 2001 From: scriptis Date: Mon, 17 Feb 2025 20:56:57 -0600 Subject: [PATCH 3/4] todo: complain about this in nixpkgs --- modules/base.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index 88e7350..17bd401 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -92,11 +92,11 @@ nix = { gc = { automatic = true; - dates = ["daily"]; + dates = "daily"; }; optimise = { automatic = true; - dates = ["daily"]; + dates = ["3:00"]; }; }; From 752ee11a0555964d32ac519baf37e820a31e56dd Mon Sep 17 00:00:00 2001 From: scriptis Date: Mon, 17 Feb 2025 21:01:03 -0600 Subject: [PATCH 4/4] remove duplicate defs on relay nodes --- modules/base.nix | 1 + nixos_systems/relay-node/base.nix | 6 ------ nixos_systems/relay-node/staging/base.nix | 6 ------ 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index 17bd401..ed834b6 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -93,6 +93,7 @@ gc = { automatic = true; dates = "daily"; + options = "--delete-older-than 3d"; }; optimise = { automatic = true; diff --git a/nixos_systems/relay-node/base.nix b/nixos_systems/relay-node/base.nix index 741e7b0..1093c2d 100644 --- a/nixos_systems/relay-node/base.nix +++ b/nixos_systems/relay-node/base.nix @@ -28,12 +28,6 @@ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; trusted-users = ["@wheel"]; - auto-optimise-store = true; - }; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; }; environment.enableAllTerminfo = true; # Enables (stable) terminfo for a bunch of extra terminals that aren't in ncurses yet (ghostty, alacritty, kitty, etc) diff --git a/nixos_systems/relay-node/staging/base.nix b/nixos_systems/relay-node/staging/base.nix index 47f4490..7473f07 100644 --- a/nixos_systems/relay-node/staging/base.nix +++ b/nixos_systems/relay-node/staging/base.nix @@ -28,12 +28,6 @@ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; trusted-users = ["@wheel"]; - auto-optimise-store = true; - }; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; }; environment.enableAllTerminfo = true; # Enables (stable) terminfo for a bunch of extra terminals that aren't in ncurses yet (ghostty, alacritty, kitty, etc)