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