System : Enabme GC for 7 days.

This commit is contained in:
Dmitry Voronin 2024-03-03 21:15:25 +03:00
parent 96aa149cb3
commit 025f711262
3 changed files with 6 additions and 7 deletions

View file

@ -1,6 +1,9 @@
{ environment, ... }: {
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
nix.extraOptions = "experimental-features = nix-command flakes";
nix.gc.automatic = true;
nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than 7d";
nix.settings.auto-optimise-store = true;
nixpkgs.config.allowUnfree = true;
nix.extraOptions = "experimental-features = nix-command flakes";
}

View file

@ -33,11 +33,8 @@ function nix_shell() {
local target="${1}"
[[ "${target}" = "" ]] && target="default"
if [[ "${target}" = "default" ]]; then
NIX_SHELL="${target}" nix develop
else
NIX_SHELL="${target}" nix develop ".#${target}"
fi
nix build ".#devShells.${target}" -o ".NixRoot"
NIX_SHELL="${target}" nix develop ".#devShells.${target}"
}
alias shell="nix_shell"

View file

@ -8,7 +8,6 @@ function prune_docker() {
# Prune Nix Store.
function prune_nix() {
nix-collect-garbage -d
_is_root && nix-store --gc
}
# Uninstall flatpaks not listed in the config.