feat: setup attic
This commit is contained in:
1 parent
9c07d9e047
commit
e536ec50d2
2 files changed
+25
-4
No files matched your search
Generated
+4
-4
@@ -176,11 +176,11 @@
|
||||
},
|
||||
"secrets": {
|
||||
"locked": {
|
||||
"lastModified": 1766822527,
|
||||
"narHash": "sha256-0qNxAxr7LQ8C6MjSxV2FkMSfdVmOVRq7Yz/wCea8plo=",
|
||||
"lastModified": 1793195490,
|
||||
"narHash": "sha256-1ReF2oGuTGF1osuK3Pc0N4C5QKQfoSbv/2HO3OJCkqw=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "695e36891b5de248993845e1435df5e4116a26f2",
|
||||
"revCount": 21,
|
||||
"rev": "02313098cbcf69356df75ba0895c913b053a2edf",
|
||||
"revCount": 22,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
|
||||
},
|
||||
|
||||
@@ -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";
|
||||
@@ -68,8 +71,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 ];
|
||||
}
|
||||
Reference in new issue
Block a user