Disable automatic garbage collection for attic
As I don't currently don't know how fast the cache fills up I'm going to go with manual garbage collection.
This commit is contained in:
parent
c3e85e924d
commit
fa9e084f2c
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ inputs, pkgs, ... }:
|
||||
let
|
||||
unlock-luks = pkgs.writeShellScriptBin "unlock-luks" ''
|
||||
until ${pkgs.netcat}/bin/nc -vzw 2 $1 22; do
|
||||
|
@ -20,7 +20,7 @@ in
|
|||
pkgs.exercism
|
||||
pkgs.git
|
||||
pkgs.nix-tree
|
||||
pkgs.unstable.attic-client
|
||||
inputs.attic.packages.${pkgs.system}.attic-client
|
||||
unlock-luks
|
||||
];
|
||||
shellAliases = {
|
||||
|
|
|
@ -6,9 +6,15 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
system = pkgs.system;
|
||||
cfg = config.services.az-attic-server;
|
||||
cacheStorage = "/mnt/binary-cache";
|
||||
atticPort = 8080;
|
||||
attic-garbage-collect = pkgs.writeShellScriptBin "attic-garbage-collect" ''
|
||||
${
|
||||
inputs.attic.packages.${system}.attic-server
|
||||
}/bin/atticd --config ${config.services.atticd.configFile} --mode garbage-collector-once
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -31,7 +37,10 @@ in
|
|||
"rw"
|
||||
];
|
||||
};
|
||||
environment.systemPackages = [ pkgs.unstable.attic-client ];
|
||||
environment.systemPackages = [
|
||||
inputs.attic.packages.${system}.attic-client
|
||||
attic-garbage-collect
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ atticPort ];
|
||||
services.atticd = {
|
||||
|
@ -56,7 +65,7 @@ in
|
|||
};
|
||||
database.url = "postgresql:///atticd?host=/run/postgresql";
|
||||
garbage-collection = {
|
||||
interval = "24h";
|
||||
interval = "0h";
|
||||
default-retention-period = "6 months";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue