/nix/store/dlwqlnbaj5vfm9aw20r1yxk8y56lmgif-repo/header.tmpl

Compare commits

...

2 commits

Author SHA1 Message Date
faukah
9eb9240db7 radicle: working seed 2025-09-04 13:08:45 +02:00
faukah
31604069fb radicle: fix port config, fix enabling 2025-09-04 11:59:51 +02:00

View file

@ -1,44 +1,50 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: }:
let let
inherit (lib.lists) singleton; inherit (lib.lists) singleton;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
inherit (lib.strings) toString; inherit (builtins) toString;
port = toString 8776; port = 3867;
domain = "git.faukah.com"; httpd_port = 3868;
domain = "seed.faukah.com";
cfg = config.modules.system.services.radicle; cfg = config.modules.system.services.radicle;
in in
{ {
options.modules.system.services.radicle.enable = mkEnableOption "radicle"; options.modules.system.services.radicle.enable = mkEnableOption "radicle";
config.services.radicle = mkIf cfg.enable { config.services = mkIf cfg.enable {
enable = false; nginx = {
checkConfig = true;
privateKeyFile = "/etc/ssh/ssh_host_ed25519_key";
publicKey = "/etc/ssh/ssh_host_ed25519_key.pub";
httpd = {
enable = true; enable = true;
listenPort = port; virtualHosts.${domain} = {
listenAddress = "[::]";
nginx = {
addSSL = true; addSSL = true;
enableACME = true; enableACME = true;
serverName = domain; locations."/" = {
proxyPass = "http://localhost:${toString httpd_port}";
};
}; };
}; };
settings = { radicle = {
node = { enable = true;
alias = domain; checkConfig = true;
listen = singleton "[::]:${port}"; privateKeyFile = "/etc/ssh/ssh_host_ed25519_key";
externalAddresses = "${domain}:${port}"; publicKey = "/etc/ssh/ssh_host_ed25519_key.pub";
seedingPolicy = { httpd = {
default = "block"; enable = true;
scope = "all"; listenPort = httpd_port;
};
settings = {
node = {
alias = domain;
listen = singleton "[::]:${toString port}";
externalAddresses = singleton "${domain}:${toString port}";
seedingPolicy = {
default = "block";
scope = "all";
};
}; };
}; };
}; };