feat(nixos): configure automated nix store garbage collection and deduplication
- Enable weekly garbage collection retaining generations newer than 14 days - Enable automatic nix store hardlink deduplication
This commit is contained in:
1 parent
f0e0fc41a1
commit
9381f3e070
1 file changed
+9
-1
@@ -19,12 +19,20 @@
|
|||||||
sops.defaultSopsFile = ./secrets.yaml;
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
sops.defaultSopsFormat = "yaml";
|
sops.defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
# ── Nix settings ─────────────────────────────────────────────────────────────
|
# ── Nix settings & maintenance ───────────────────────────────────────────────
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Pin nixpkgs registry to the flake input (avoids GitHub API calls from the CLI)
|
# Pin nixpkgs registry to the flake input (avoids GitHub API calls from the CLI)
|
||||||
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
|
||||||
|
# Automated garbage collection and store hardlink deduplication
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 14d";
|
||||||
|
};
|
||||||
|
nix.optimise.automatic = true;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# ── Regional & locale settings ───────────────────────────────────────────────
|
# ── Regional & locale settings ───────────────────────────────────────────────
|
||||||
|
|||||||
Reference in new issue
Block a user