/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, 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 = {
enable = true;
virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString httpd_port}";
};
};
};
radicle = {
enable = true;
checkConfig = true; checkConfig = true;
privateKeyFile = "/etc/ssh/ssh_host_ed25519_key"; privateKeyFile = "/etc/ssh/ssh_host_ed25519_key";
publicKey = "/etc/ssh/ssh_host_ed25519_key.pub"; publicKey = "/etc/ssh/ssh_host_ed25519_key.pub";
httpd = { httpd = {
enable = true; enable = true;
listenPort = port; listenPort = httpd_port;
listenAddress = "[::]";
nginx = {
addSSL = true;
enableACME = true;
serverName = domain;
};
}; };
settings = { settings = {
node = { node = {
alias = domain; alias = domain;
listen = singleton "[::]:${port}"; listen = singleton "[::]:${toString port}";
externalAddresses = "${domain}:${port}"; externalAddresses = singleton "${domain}:${toString port}";
seedingPolicy = { seedingPolicy = {
default = "block"; default = "block";
scope = "all"; scope = "all";
@ -43,4 +48,5 @@ in
}; };
}; };
}; };
};
} }