feat: setup attic

This commit is contained in:
Jan-Bulthuis committed 2026-10-28 15:03:17 +01:00
1 parent 9c07d9e047
commit d3c6f9b1d1
2 files changed
+26 -4

No files matched your search

+22
View File
@@ -1,4 +1,6 @@
{
config,
inputs,
...
}:
@@ -32,6 +34,7 @@
};
modules.impermanence.directories = [
"/var/lib/private/matterjs-server"
"/var/lib/private/atticd"
{
directory = "/var/lib/hass";
user = "hass";
@@ -41,6 +44,7 @@
];
systemd.tmpfiles.rules = [
"d /var/lib/private 0700 root root -"
"d /persist/system/var/lib/private 0700 root root -"
];
networking.firewall.allowedUDPPorts = [
5353 # mDNS
@@ -68,8 +72,26 @@
};
networking.firewall.allowedTCPPorts = [
8123 # Home Assistant
8080 # Attic
];
# Attic binary cache, served as cache.ib.baksteeninc.net behind the reverse proxy
sops.secrets."atticd/env".sopsFile = "${inputs.secrets}/secrets/ws-home.enc.yaml";
services.atticd = {
enable = true;
environmentFile = config.sops.secrets."atticd/env".path;
settings = {
listen = "[::]:8080";
api-endpoint = "https://cache.ib.baksteeninc.net/";
compression.type = "zstd";
garbage-collection = {
interval = "12 hours";
# Drop paths that have not been accessed for this long
default-retention-period = "3 months";
};
};
};
# Set up hardware
imports = [ ./hardware-configuration.nix ];
}