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