Compare commits
2 commits
2489852297
...
9eb9240db7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9eb9240db7 | ||
![]() |
31604069fb |
1 changed files with 28 additions and 22 deletions
|
@ -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
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue