Compare commits
No commits in common. "9eb9240db75ee623e5e154dd37f4c050d3be3401" and "248985229728484a9efb35789e0d346fec536fd4" have entirely different histories.
9eb9240db7
...
2489852297
1 changed files with 22 additions and 28 deletions
|
@ -1,50 +1,44 @@
|
||||||
{
|
{
|
||||||
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 (builtins) toString;
|
inherit (lib.strings) toString;
|
||||||
port = 3867;
|
port = toString 8776;
|
||||||
httpd_port = 3868;
|
domain = "git.faukah.com";
|
||||||
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 = mkIf cfg.enable {
|
config.services.radicle = mkIf cfg.enable {
|
||||||
nginx = {
|
enable = false;
|
||||||
|
checkConfig = true;
|
||||||
|
privateKeyFile = "/etc/ssh/ssh_host_ed25519_key";
|
||||||
|
publicKey = "/etc/ssh/ssh_host_ed25519_key.pub";
|
||||||
|
httpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts.${domain} = {
|
listenPort = port;
|
||||||
|
listenAddress = "[::]";
|
||||||
|
nginx = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
serverName = domain;
|
||||||
proxyPass = "http://localhost:${toString httpd_port}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
radicle = {
|
settings = {
|
||||||
enable = true;
|
node = {
|
||||||
checkConfig = true;
|
alias = domain;
|
||||||
privateKeyFile = "/etc/ssh/ssh_host_ed25519_key";
|
listen = singleton "[::]:${port}";
|
||||||
publicKey = "/etc/ssh/ssh_host_ed25519_key.pub";
|
externalAddresses = "${domain}:${port}";
|
||||||
httpd = {
|
seedingPolicy = {
|
||||||
enable = true;
|
default = "block";
|
||||||
listenPort = httpd_port;
|
scope = "all";
|
||||||
};
|
|
||||||
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