mirror of
https://seed.radicle.dev/rad:z254T5p17bdFPmzfDojsdjo4HjpoZ.git
synced 2026-11-16 08:10:43 +08:00
seed: Enable Attic
This commit is contained in:
@@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -13,6 +13,7 @@
|
||||
../../mixin/sops.nix
|
||||
../../mixin/users.nix
|
||||
|
||||
./attic.nix
|
||||
./ssh.nix
|
||||
./tor.nix
|
||||
./radicle.nix
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user