tinc refactoring

This commit is contained in:
Ingolf Wagner 2024-06-07 09:42:26 +02:00
parent 58804e2762
commit a1e7e8b305
Signed by: palo
GPG key ID: 76BF5F1928B9618B
3 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, factsGenerator, ... }:
{ lib, config, factsGenerator, clanLib, ... }:
with lib;
{
@ -24,13 +24,13 @@ with lib;
ipv4 = config.tinc.private.ipv4;
ipv6 = null;
inherit (lib) optionalString concatStringsSep mapAttrsToList;
inherit config factsGenerator;
inherit config factsGenerator clanLib;
}))
(mkIf config.tinc.secret.enable (import ./secret.nix {
ipv4 = config.tinc.secret.ipv4;
ipv6 = null;
inherit (lib) optionalString concatStringsSep mapAttrsToList;
inherit config factsGenerator;
inherit config factsGenerator clanLib;
}))
];
}

View file

@ -5,6 +5,7 @@
, concatStringsSep
, factsGenerator
, mapAttrsToList
, clanLib
, ...
}:
let
@ -55,8 +56,7 @@ let
"paperless.chungus" = hosts.chungus;
};
network = "private";
Ed25519PublicKey = machine: (builtins.readFile "${config.clanCore.clanDir}/machines/${machine}/facts/tinc.private.ed25519_key.pub");
Ed25519PublicKeyFile = machine: "${config.clanCore.clanDir}/machines/${machine}/facts/tinc.private.ed25519_key.pub";
Ed25519PublicKey = clanLib.readFact "tinc.private.ed25519_key.pub";
in
{
networking.firewall.trustedInterfaces = [ "tinc.${network}" ];

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, factsGenerator, ... }: {
{ config, lib, pkgs, ... }: {
# todo: backup taskserver via zfs syncoid
services.taskserver = {