diff options
author | stuebinm | 2023-10-12 01:02:42 +0200 |
---|---|---|
committer | stuebinm | 2023-10-12 01:02:42 +0200 |
commit | 1795ddbbe908360d051289e450eb2cf054b44dfc (patch) | |
tree | 3e4fbc8ebf8dfbce57d7ae6db6e424c307103529 /chaski | |
parent | 0bc531e9d6aa27d32210917a82263cc676d8ab41 (diff) |
playing around with radicle.xyz
this packages the heartwood cli tools, the radicle web interface, and
runs a small example deployment on chaski.
TODO: decide if i want to keep this thing, then add declarative config
of the web interface, `rad auth`, and the radicle node to a NixOS
module; the current state is kinda suboptimal to deploy.
Diffstat (limited to 'chaski')
-rw-r--r-- | chaski/services/radicle.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/chaski/services/radicle.nix b/chaski/services/radicle.nix new file mode 100644 index 0000000..f02a934 --- /dev/null +++ b/chaski/services/radicle.nix @@ -0,0 +1,68 @@ +{ config, lib, pkgs, ... }: + +{ + services.nginx.virtualHosts."node.radicle.stuebinm.eu" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://localhost:4444"; + }; + + services.nginx.virtualHosts."radicle.stuebinm.eu" = { + enableACME = true; + forceSSL = true; + locations."/nodes".tryFiles = "/index.html =404"; + root = pkgs.radicle-interface.override { + config = { + nodes = { + defaultHttpdPort = 443; + defaultLocalHttpdPort = 8080; + defaultHttpdScheme = "https"; + defaultNodePort = 8776; + pinned = [ { + baseUrl = { + hostname = "node.radicle.stuebinm.eu"; + port = 443; + scheme = "https"; + }; + } ]; + }; + reactions = ["👍" "👎" "😄" "🎉" "🙁" "🚀" "👀"]; + projects.pinned = [ { + name = "radicle-interface"; + id = "rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5"; + baseUrl = { + hostname = "seed.radicle.xyz"; + port = 443; + scheme = "https"; + }; + } ]; + }; + }; + }; + + systemd.services.radicle-httpd = { + enable = true; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "simple"; + Restart = "always"; + MemoryMax = "1G"; + User = "radicle"; + Group = "radicle"; + }; + environment.RAD_HOME = "/var/lib/radicle"; + path = [ pkgs.heartwood pkgs.gitMinimal ]; + script = '' + cd /var/lib/radicle + radicle-httpd --listen 0.0.0.0:4444; + ''; + }; + + users.users.radicle = { + group = "radicle"; + isSystemUser = true; + }; + users.groups.radicle = {}; + + environment.systemPackages = [ pkgs.heartwood ]; +} |