diff options
author | lassulus <git@lassul.us> | 2023-06-10 12:50:53 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-06-21 14:47:04 +0200 |
commit | e174ef53caafbcee1e8a2ee83d6195f97afb9388 (patch) | |
tree | 630c6d61843c4a6df904327316f8c3a02a68dd3d /kartei/xkey | |
parent | d59586939d9530ee55a4c5a3310ae13042127e09 (diff) |
flake: init
Diffstat (limited to 'kartei/xkey')
-rw-r--r-- | kartei/xkey/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kartei/xkey/default.nix b/kartei/xkey/default.nix index 939e04c7b..9f80288f6 100644 --- a/kartei/xkey/default.nix +++ b/kartei/xkey/default.nix @@ -1,6 +1,7 @@ -with import ../../lib; -{ config, ... }: +{ config, lib, ... }: let + inherit (lib) flip mapAttrs optionalAttrs recursiveUpdate; + slib = import ../../lib/pure.nix { inherit lib; }; maybeEmpty = attrset: key: if (attrset?key) then attrset.${key} else []; hostDefaults = hostName: host: flip recursiveUpdate host ({ ci = false; @@ -9,11 +10,11 @@ let owner = config.krebs.users.xkey; } // optionalAttrs (host.nets?retiolum) { nets.retiolum = { - ip6.addr = (krebs.genipv6 "retiolum" "external" { inherit hostName; }).address; + ip6.addr = (slib.krebs.genipv6 "retiolum" "external" { inherit hostName; }).address; }; } // optionalAttrs (host.nets?wiregrill) { nets.wiregrill = { - ip6.addr = (krebs.genipv6 "wiregrill" "external" { inherit hostName; }).address; + ip6.addr = (slib.krebs.genipv6 "wiregrill" "external" { inherit hostName; }).address; }; }); ssh-for = name: builtins.readFile (./ssh + "/${name}.pub"); |