infra/nix/os/snippets/mycelium.nix

33 lines
608 B
Nix
Raw Permalink Normal View History

2024-05-25 11:35:26 +02:00
{
repoFlake,
nodeName,
config,
lib,
2024-05-25 11:35:26 +02:00
...
2024-11-15 10:17:56 +01:00
}:
let
cfg.autostart = false;
2024-11-15 10:17:56 +01:00
in
{
imports = [ ];
2024-05-25 11:35:26 +02:00
sops.secrets.mycelium-key = {
format = "binary";
sopsFile = repoFlake + "/secrets/${nodeName}/mycelium_priv_key.bin.enc";
};
services.mycelium = {
enable = true;
2024-07-26 14:08:24 +02:00
# package = nodeFlake.inputs.mycelium.packages.${system}.myceliumd;
2024-05-25 11:35:26 +02:00
keyFile = config.sops.secrets.mycelium-key.path;
addHostedPublicNodes = true;
2024-11-15 10:17:56 +01:00
peers = [ ];
2024-05-25 11:35:26 +02:00
# tunName = "mycelium-pub";
2024-11-15 10:17:56 +01:00
extraArgs = [ ];
2024-05-25 11:35:26 +02:00
};
2024-11-15 10:17:56 +01:00
systemd.services.mycelium.wantedBy = lib.mkIf (!cfg.autostart) (lib.mkForce [ ]);
2024-05-25 11:35:26 +02:00
}