Update nix settings in line with my setup
parent
725d352b33
commit
744dcd462f
|
@ -29,22 +29,15 @@
|
||||||
|
|
||||||
# Nix daemon config
|
# Nix daemon config
|
||||||
nix = {
|
nix = {
|
||||||
# Automate garbage collection
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
|
|
||||||
package = pkgs.nixVersions.stable;
|
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
|
# This will add each flake input as a registry
|
||||||
experimental-features = nix-command flakes
|
# 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 = {
|
settings = {
|
||||||
# Automate `nix store --optimise`
|
# Automate `nix store --optimise`
|
||||||
|
@ -52,6 +45,21 @@
|
||||||
|
|
||||||
# Required by Cachix to be used as non-root user
|
# Required by Cachix to be used as non-root user
|
||||||
trusted-users = [ "root" "alice" ];
|
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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue