tinc refactoring
This commit is contained in:
parent
58804e2762
commit
a1e7e8b305
3 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
}))
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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}" ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, factsGenerator, ... }: {
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
# todo: backup taskserver via zfs syncoid
|
||||
services.taskserver = {
|
||||
|
|
Loading…
Reference in a new issue