complete radicle module and enable it on Cape
This commit is contained in:
parent
9913207890
commit
e9f186d8ff
3 changed files with 94 additions and 59 deletions
|
|
@ -7,6 +7,7 @@
|
|||
./users
|
||||
./disko-config.nix
|
||||
./miniflux.nix
|
||||
./radicle.nix
|
||||
];
|
||||
|
||||
youthlic = {
|
||||
|
|
|
|||
9
nixos/configurations/Cape/radicle.nix
Normal file
9
nixos/configurations/Cape/radicle.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{config, ...}: {
|
||||
sops.secrets."ssh-private-key/radicle/Cape" = {};
|
||||
youthlic.programs.radicle = {
|
||||
enable = true;
|
||||
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBbQrJNWcWsFncTX4w/hkhz6zPNwHrTjA+6lnq5dmu/s radicle";
|
||||
privateKeyFile = config.sops.secrets."ssh-private-key/radicle/Cape".path;
|
||||
domain = "seed.youthlic.fun";
|
||||
};
|
||||
}
|
||||
|
|
@ -14,13 +14,21 @@ in {
|
|||
publicKey = lib.mkOption {
|
||||
type = with lib.types; either path str;
|
||||
};
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
services.radicle = {
|
||||
enable = true;
|
||||
node.listenAddress = "127.0.0.1";
|
||||
inherit (cfg) publicKey privateKeyFile;
|
||||
node.openFirewall = true;
|
||||
httpd = {
|
||||
enable = true;
|
||||
listenPort = 8489;
|
||||
};
|
||||
settings = {
|
||||
publicExplorer = "https://app.radicle.xyz/nodes/$host/$rid$path";
|
||||
preferredSeeds = [
|
||||
|
|
@ -30,20 +38,27 @@ in {
|
|||
];
|
||||
web = {
|
||||
pinned = {
|
||||
repositories = [];
|
||||
repositories = [
|
||||
"rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5"
|
||||
"rad:z4D5UCArafTzTQpDZNQRuqswh3ury"
|
||||
"rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5"
|
||||
"rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt"
|
||||
];
|
||||
};
|
||||
};
|
||||
cli = {
|
||||
hints = true;
|
||||
};
|
||||
node = {
|
||||
alias = "youthlic";
|
||||
alias = cfg.domain;
|
||||
listen = [];
|
||||
peers = {
|
||||
type = "dynamic";
|
||||
};
|
||||
connect = [];
|
||||
extrnalAddresses = [];
|
||||
externalAddresses = [
|
||||
"${cfg.domain}:8776"
|
||||
];
|
||||
network = "main";
|
||||
log = "INFO";
|
||||
relay = "auto";
|
||||
|
|
@ -75,5 +90,15 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enable && config.youthlic.programs.caddy.enable) {
|
||||
services.caddy.virtualHosts = {
|
||||
"${cfg.domain}" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:8489
|
||||
'';
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue