Install attic
on sisko
This commit is contained in:
parent
fa3a5e4ac4
commit
24201d0db6
5 changed files with 60 additions and 0 deletions
52
modules/atticd/default.nix
Normal file
52
modules/atticd/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.atticd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
listen = "0.0.0.0:8081";
|
||||
allowed-hosts = [ ]; # Allow all hosts
|
||||
# api-endpoint = "https://cache.staging.mlabs.city/";
|
||||
soft-delete-caches = false;
|
||||
require-proof-of-possession = true;
|
||||
|
||||
database.url = "sqlite://${config.services.atticd.settings.storage.path}/server.db?mode=rwc";
|
||||
|
||||
storage = {
|
||||
type = "local";
|
||||
path = "/mnt/hd/atticd";
|
||||
};
|
||||
|
||||
compression = {
|
||||
level = 8;
|
||||
type = "zstd";
|
||||
};
|
||||
|
||||
chunking = {
|
||||
nar-size-threshold = 64 * 1024; # 64 KiB
|
||||
min-size = 16 * 1024; # 16 KiB
|
||||
avg-size = 64 * 1024; # 64 KiB
|
||||
max-size = 256 * 1024; # 256 KiB
|
||||
};
|
||||
};
|
||||
environmentFile = config.age.secrets.sisko-attic-environment-file.path;
|
||||
};
|
||||
|
||||
systemd.services.atticd = {
|
||||
serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d config.services.atticd.settings.storage.path 770 atticd atticd"
|
||||
];
|
||||
|
||||
users = {
|
||||
groups.atticd = { };
|
||||
users.atticd = {
|
||||
group = "atticd";
|
||||
home = config.services.atticd.settings.storage.path;
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue