update some

This commit is contained in:
Sense T 2023-06-29 07:21:20 +08:00
parent 47616f4337
commit e7080c4ff1
2 changed files with 14 additions and 4 deletions

View File

@ -11,15 +11,15 @@ debug:
nixos-rebuild switch --flake '.#gpd' --use-remote-sudo --show-trace --verbose nixos-rebuild switch --flake '.#gpd' --use-remote-sudo --show-trace --verbose
update: update:
nix flake update --extra-experimental-features nix-command nix flake update
history: history:
nix profile history --profile /nix/var/nix/profiles/system --extra-experimental-features nix-command nix profile history --profile /nix/var/nix/profiles/system
gc: gc:
# remove all generations older than 7 days # remove all generations older than 7 days
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 3d --extra-experimental-features nix-command sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 3d
# garbage collect all unused nix store entries # garbage collect all unused nix store entries
sudo nix store gc --debug --extra-experimental-features nix-command sudo nix store gc --debug
nix-collect-garbage -d nix-collect-garbage -d

View File

@ -23,4 +23,14 @@
LC_TIME = "zh_CN.UTF-8"; LC_TIME = "zh_CN.UTF-8";
}; };
}; };
nix.settings = {
auto-optimise-store = true;
experimental-features = [
"nix-command"
"flakes"
];
};
nix.gc.automatic = true;
} }