feat: setup attic
This commit is contained in:
1 parent
9c07d9e047
commit
d3c6f9b1d1
2 files changed
+26
-4
No files matched your search
Generated
+4
-4
@@ -176,11 +176,11 @@
|
|||||||
},
|
},
|
||||||
"secrets": {
|
"secrets": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766822527,
|
"lastModified": 1793195490,
|
||||||
"narHash": "sha256-0qNxAxr7LQ8C6MjSxV2FkMSfdVmOVRq7Yz/wCea8plo=",
|
"narHash": "sha256-1ReF2oGuTGF1osuK3Pc0N4C5QKQfoSbv/2HO3OJCkqw=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "695e36891b5de248993845e1435df5e4116a26f2",
|
"rev": "02313098cbcf69356df75ba0895c913b053a2edf",
|
||||||
"revCount": 21,
|
"revCount": 22,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
|
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -32,6 +34,7 @@
|
|||||||
};
|
};
|
||||||
modules.impermanence.directories = [
|
modules.impermanence.directories = [
|
||||||
"/var/lib/private/matterjs-server"
|
"/var/lib/private/matterjs-server"
|
||||||
|
"/var/lib/private/atticd"
|
||||||
{
|
{
|
||||||
directory = "/var/lib/hass";
|
directory = "/var/lib/hass";
|
||||||
user = "hass";
|
user = "hass";
|
||||||
@@ -41,6 +44,7 @@
|
|||||||
];
|
];
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/lib/private 0700 root root -"
|
"d /var/lib/private 0700 root root -"
|
||||||
|
"d /persist/system/var/lib/private 0700 root root -"
|
||||||
];
|
];
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall.allowedUDPPorts = [
|
||||||
5353 # mDNS
|
5353 # mDNS
|
||||||
@@ -68,8 +72,26 @@
|
|||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
8123 # Home Assistant
|
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
|
# Set up hardware
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user