Files
nixos/modules/ogygia/irisd.nix
JakeHillion 817cfe70fd
commit-validation / validate-single-commit (pull_request) Successful in 8s
buildbot/nix-eval Build done. (513 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
ogygia: extract irisd
irisd carried 3 pieces of config that were confusingly spread around
ogygia/defualt.nix. These are the irisd config itself with a host list,
the Nebula firewall group & rules, and the impermanence settings.

Extract it into ogygia/irisd.nix so these are all more clearly related.

Test plan:
- eyes (no-op refactor)
2026-07-29 22:28:09 +01:00

31 lines
764 B
Nix

{ pkgs, lib, config, ... }:
let
cfg = config.custom.ogygia;
allHosts = builtins.attrNames (builtins.readDir ../../hosts);
hosts = builtins.filter (h: h != "fanboy.cx.neb.jakehillion.me" && h != config.networking.fqdn) allHosts;
in
{
config = lib.mkIf cfg.enable {
ogygia = {
irisd = {
enable = true;
configureNixDaemon = true;
settings.peers.urls = builtins.map (fqdn: "http://${fqdn}:35742") hosts;
};
nebula = {
groups = [ "irisd-client" ];
firewall.inbound = [
{ groups = [ "irisd-client" ]; port = 35742; proto = "tcp"; }
];
};
};
custom.impermanence.extraDirs = lib.mkIf config.custom.impermanence.enable [ "/var/cache/private/ogygia-irisd" ];
};
}