Install attic
on sisko
This commit is contained in:
parent
fa3a5e4ac4
commit
24201d0db6
5 changed files with 60 additions and 0 deletions
|
@ -110,11 +110,13 @@
|
|||
"cloudflare-dyndns-api-token" = { };
|
||||
"restic-hetzner-password" = { };
|
||||
"hass-ssh-key".owner = "hass";
|
||||
"sisko-attic-environment-file".owner = "atticd";
|
||||
"autistici-password" = {
|
||||
# FIXME terrible, should create a third ad-hoc group
|
||||
owner = "grafana";
|
||||
group = "forgejo";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
"immich"
|
||||
"paperless"
|
||||
"syncthing"
|
||||
"atticd"
|
||||
]
|
||||
++ [
|
||||
./disko.nix
|
||||
|
|
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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -161,6 +161,11 @@ with keys.users;
|
|||
ccr-gpg
|
||||
sisko
|
||||
];
|
||||
"sisko-attic-environment-file.age".publicKeys = [
|
||||
ccr-ssh
|
||||
ccr-gpg
|
||||
sisko
|
||||
];
|
||||
|
||||
# WireGuard
|
||||
"picard-wireguard-private-key.age".publicKeys = [
|
||||
|
|
BIN
secrets/sisko-attic-environment-file.age
Normal file
BIN
secrets/sisko-attic-environment-file.age
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue