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;
|
with lib;
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@ with lib;
|
||||||
ipv4 = config.tinc.private.ipv4;
|
ipv4 = config.tinc.private.ipv4;
|
||||||
ipv6 = null;
|
ipv6 = null;
|
||||||
inherit (lib) optionalString concatStringsSep mapAttrsToList;
|
inherit (lib) optionalString concatStringsSep mapAttrsToList;
|
||||||
inherit config factsGenerator;
|
inherit config factsGenerator clanLib;
|
||||||
}))
|
}))
|
||||||
(mkIf config.tinc.secret.enable (import ./secret.nix {
|
(mkIf config.tinc.secret.enable (import ./secret.nix {
|
||||||
ipv4 = config.tinc.secret.ipv4;
|
ipv4 = config.tinc.secret.ipv4;
|
||||||
ipv6 = null;
|
ipv6 = null;
|
||||||
inherit (lib) optionalString concatStringsSep mapAttrsToList;
|
inherit (lib) optionalString concatStringsSep mapAttrsToList;
|
||||||
inherit config factsGenerator;
|
inherit config factsGenerator clanLib;
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
, concatStringsSep
|
, concatStringsSep
|
||||||
, factsGenerator
|
, factsGenerator
|
||||||
, mapAttrsToList
|
, mapAttrsToList
|
||||||
|
, clanLib
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -55,8 +56,7 @@ let
|
||||||
"paperless.chungus" = hosts.chungus;
|
"paperless.chungus" = hosts.chungus;
|
||||||
};
|
};
|
||||||
network = "private";
|
network = "private";
|
||||||
Ed25519PublicKey = machine: (builtins.readFile "${config.clanCore.clanDir}/machines/${machine}/facts/tinc.private.ed25519_key.pub");
|
Ed25519PublicKey = clanLib.readFact "tinc.private.ed25519_key.pub";
|
||||||
Ed25519PublicKeyFile = machine: "${config.clanCore.clanDir}/machines/${machine}/facts/tinc.private.ed25519_key.pub";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.firewall.trustedInterfaces = [ "tinc.${network}" ];
|
networking.firewall.trustedInterfaces = [ "tinc.${network}" ];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, factsGenerator, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
# todo: backup taskserver via zfs syncoid
|
# todo: backup taskserver via zfs syncoid
|
||||||
services.taskserver = {
|
services.taskserver = {
|
||||||
|
|
Loading…
Reference in a new issue