From 7d69b17ccae30569214853a156aa764a31b19c7a Mon Sep 17 00:00:00 2001 From: Trevor Vallender Date: Mon, 28 Aug 2023 13:45:03 +0100 Subject: [PATCH] Optimisations - Remove gpg from system-wide settings (we have it in home manager too). - Try different gc settings. --- bin/gc.bash | 5 +++++ system/shared/shared-configuration.nix | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 bin/gc.bash diff --git a/bin/gc.bash b/bin/gc.bash new file mode 100644 index 0000000..bee54ec --- /dev/null +++ b/bin/gc.bash @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +nix-collect-garbage -d +sudo rm /nix/var/nix/gcroots/auto/* +nix-store --gc diff --git a/system/shared/shared-configuration.nix b/system/shared/shared-configuration.nix index 6c7eb54..eb3f002 100644 --- a/system/shared/shared-configuration.nix +++ b/system/shared/shared-configuration.nix @@ -42,21 +42,18 @@ nix = { extraOptions = "experimental-features = nix-command flakes"; package = pkgs.nixFlakes; + settings = { + auto-optimise-store = true; + }; gc = { automatic = true; dates = "weekly"; - options = "--delete-older-than 30d"; + options = "--delete-older-than 7d"; }; }; hardware.bluetooth.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - pinentryFlavor = "curses"; - }; - nixpkgs.config.allowUnfree = true; services.openssh = {