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
|
let
|
||||||
unlock-luks = pkgs.writeShellScriptBin "unlock-luks" ''
|
unlock-luks = pkgs.writeShellScriptBin "unlock-luks" ''
|
||||||
until ${pkgs.netcat}/bin/nc -vzw 2 $1 22; do
|
until ${pkgs.netcat}/bin/nc -vzw 2 $1 22; do
|
||||||
|
@ -20,7 +20,7 @@ in
|
||||||
pkgs.exercism
|
pkgs.exercism
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.nix-tree
|
pkgs.nix-tree
|
||||||
pkgs.unstable.attic-client
|
inputs.attic.packages.${pkgs.system}.attic-client
|
||||||
unlock-luks
|
unlock-luks
|
||||||
];
|
];
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
|
@ -6,9 +6,15 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
system = pkgs.system;
|
||||||
cfg = config.services.az-attic-server;
|
cfg = config.services.az-attic-server;
|
||||||
cacheStorage = "/mnt/binary-cache";
|
cacheStorage = "/mnt/binary-cache";
|
||||||
atticPort = 8080;
|
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
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -31,7 +37,10 @@ in
|
||||||
"rw"
|
"rw"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
environment.systemPackages = [ pkgs.unstable.attic-client ];
|
environment.systemPackages = [
|
||||||
|
inputs.attic.packages.${system}.attic-client
|
||||||
|
attic-garbage-collect
|
||||||
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ atticPort ];
|
networking.firewall.allowedTCPPorts = [ atticPort ];
|
||||||
services.atticd = {
|
services.atticd = {
|
||||||
|
@ -56,7 +65,7 @@ in
|
||||||
};
|
};
|
||||||
database.url = "postgresql:///atticd?host=/run/postgresql";
|
database.url = "postgresql:///atticd?host=/run/postgresql";
|
||||||
garbage-collection = {
|
garbage-collection = {
|
||||||
interval = "24h";
|
interval = "0h";
|
||||||
default-retention-period = "6 months";
|
default-retention-period = "6 months";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue