seed: Enable Attic

This commit is contained in:
Lorenz Leutgeb
2025-06-05 13:27:08 +02:00
parent 1b0c498ca6
commit d690ab6699
4 changed files with 65 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
{config, ...}: let
domain = "attic.radicle.xyz";
port = 54862;
secret = "atticd.env";
in {
sops.secrets.${secret} = {
sopsFile = ./sops/atticd.env;
format = "dotenv";
};
services = {
atticd = {
enable = true;
environmentFile = config.sops.secrets.${secret}.path;
settings = {
listen = "127.0.0.1:${builtins.toString port}";
storage = {
bucket = "radicle-attic";
type = "s3";
region = "eu-central";
endpoint = "https://hel1.your-objectstorage.com";
};
garbage-collection.interval = "48 hours";
api-endpoint = "https://${domain}/";
};
};
nginx.virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
serverName = domain;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString port}";
extraConfig = ''
client_max_body_size 512m;
'';
};
};
};
}
+1
View File
@@ -13,6 +13,7 @@
../../mixin/sops.nix
../../mixin/users.nix
./attic.nix
./ssh.nix
./tor.nix
./radicle.nix
+7
View File
@@ -0,0 +1,7 @@
# attic
Generated according to <https://docs.attic.rs/admin-guide/deployment/nixos.html>:
```
echo "ATTIC_SERVER_TOKEN_RS256_SECRET_BASE64=\"$(nix run nixpkgs#openssl -- genrsa -traditional 4096 | base64 -w0)\"" | sops --input-type dotenv --output-type dotenv --encrypt --filename-override atticd.env /dev/stdin > atticd.env
```
File diff suppressed because one or more lines are too long