1
1
Fork 0

Update nix settings in line with my setup

main
Bill Ewanick 2023-09-21 11:55:43 -04:00
parent 725d352b33
commit 744dcd462f
1 changed files with 22 additions and 14 deletions

View File

@ -29,22 +29,15 @@
# Nix daemon config
nix = {
# Automate garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
package = pkgs.nixVersions.stable;
extraOptions = ''
# https://github.com/nix-community/nix-direnv#home-manager
keep-outputs = true
keep-derivations = true
# Enable the nix 2.0 CLI and flakes support feature-flags
experimental-features = nix-command flakes
'';
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
# Automate `nix store --optimise`
@ -52,6 +45,21 @@
# Required by Cachix to be used as non-root user
trusted-users = [ "root" "alice" ];
experimental-features = [ "nix-command" "flakes" ];
};
extraOptions = ''
# https://github.com/nix-community/nix-direnv#home-manager
keep-outputs = true
keep-derivations = true
'';
# Automate garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};