nix/module.nix: refactor comments

This commit is contained in:
Bloxx12 2025-04-09 15:31:18 +02:00
commit 8ab86a1204

View file

@ -26,24 +26,22 @@ in {
lib.mapAttrs (_: v: {flake = v;}) inputs lib.mapAttrs (_: v: {flake = v;}) inputs
// {system.flake = inputs.self;}; // {system.flake = inputs.self;};
# This will additionally add your inputs to the system's legacy channels # Add inputs to the system's legacy channels
# Making legacy nix commands consistent as well # to make legacy nix commands consistent as well
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
# Run the Nix daemon on lowest possible priority so that my system # Run the Nix daemon on lowest possible priority
# stays responsive during demanding tasks such as GC and builds.
# This is especially useful while auto-gc and auto-upgrade are enabled
# as they can be quite demanding on the CPU.
daemonCPUSchedPolicy = "idle"; daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle"; daemonIOSchedClass = "idle";
daemonIOSchedPriority = 7; daemonIOSchedPriority = 7;
# Collect garbage # Collect garbage
# NOTE: I use nh for this.
gc = { gc = {
automatic = false; automatic = false;
dates = "20:00"; dates = "20:00";
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";
persistent = false; # don't try to catch up on missed GC runs persistent = false;
}; };
# Automatically optimize nix store by removing hard links # Automatically optimize nix store by removing hard links
@ -132,13 +130,12 @@ in {
keep-derivations = true; keep-derivations = true;
keep-outputs = true; keep-outputs = true;
# Use binary cache, this is not Gentoo # Use binary cache
# external builders can also pick up those substituters
builders-use-substitutes = true; builders-use-substitutes = true;
# Substituters to pull from. # Substituters to pull from.
substituters = [ substituters = [
"https://cache.nixos.org" # funny binary cache "https://cache.nixos.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [