This commit is contained in:
Lucy Hochkamp 2024-04-02 16:15:31 +02:00
parent aed461750e
commit 626cf8adba
No known key found for this signature in database
2 changed files with 15 additions and 17 deletions

View file

@ -1,7 +1,7 @@
{ config, pkgs, options, ... }: {
imports = [
../../nixos-modules/services/tailscale-openvpn.nix
../../nixos-modules/system/agenix.nix
../../nixos-modules/services/tailscale-openvpn.nix
../../nixos-modules/system/agenix.nix
];
ragon = {
agenix.secrets."ovpnNl" = { };
@ -12,13 +12,13 @@
agenix.secrets."ovpnPw2" = { };
agenix.secrets."tailscaleKey" = { };
services.tailscale-openvpn = {
enable = true;
tsAuthKey = config.age.secrets.tailscaleKey.path;
config = {
nl = config.age.secrets.ovpnNl.path;
de = config.age.secrets.ovpnDe.path;
tu = config.age.secrets.ovpnTu.path;
};
enable = true;
tsAuthKey = config.age.secrets.tailscaleKey.path;
config = {
nl = config.age.secrets.ovpnNl.path;
de = config.age.secrets.ovpnDe.path;
tu = config.age.secrets.ovpnTu.path;
};
};
};
}
}

View file

@ -36,10 +36,9 @@ with lib;
(server: _: nameValuePair ("container@${container server}") ({ requires = [ "network-addresses-${bridgeExt}.service" ]; }))
cfg.config
);
containers = imap0
(i: name: {
name = name;
value = {
containers = builtins.listToAttrs (imap0
(i: name: nameValuePair name
{
autoStart = true;
ephemeral = true;
enableTun = true;
@ -67,9 +66,8 @@ with lib;
};
};
};
})
(builtins.attrNames cfg.config);
})
(builtins.attrNames cfg.config));