mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-24 02:11:29 +01:00
fix: agenix on nix-darwin, update flake.nix
This commit is contained in:
@@ -29,25 +29,6 @@
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
|
||||
# do garbage collection weekly to keep disk usage low
|
||||
nix.gc =
|
||||
{
|
||||
automatic = lib.mkDefault true;
|
||||
options = lib.mkDefault "--delete-older-than 7d";
|
||||
}
|
||||
// (
|
||||
if pkgs.stdenv.isLinux
|
||||
then {
|
||||
dates = lib.mkDefault "weekly";
|
||||
}
|
||||
else {
|
||||
# nix-darwin
|
||||
interval = {
|
||||
Hour = 24;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = lib.mkDefault false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
###################################################################################
|
||||
@@ -27,7 +26,7 @@
|
||||
# Disable auto-optimise-store because of this issue:
|
||||
# https://github.com/NixOS/nix/issues/7273
|
||||
# "error: cannot link '/nix/store/.tmp-link-xxxxx-xxxxx' to '/nix/store/.links/xxxx': File exists"
|
||||
nix.settings = {
|
||||
auto-optimise-store = false;
|
||||
};
|
||||
nix.settings.auto-optimise-store = false;
|
||||
|
||||
nix.gc.automatic = false;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
# for nix server, we do not need to keep too much generations
|
||||
boot.loader.systemd-boot.configurationLimit = lib.mkDefault 10;
|
||||
|
||||
# do garbage collection weekly to keep disk usage low
|
||||
nix.gc = {
|
||||
automatic = lib.mkDefault true;
|
||||
dates = lib.mkDefault "weekly";
|
||||
options = lib.mkDefault "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# Manual optimise storage: nix-store --optimise
|
||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
Reference in New Issue
Block a user