stockholm/kartei/lass/default.nix

36 lines
930 B
Nix
Raw Normal View History

2023-06-10 10:50:53 +00:00
{ config, lib, ... }: let
slib = import ../../lib/pure.nix { inherit lib; };
2023-06-10 10:50:53 +00:00
r6 = ip: (slib.krebs.genipv6 "retiolum" "lass" ip).address;
w6 = ip: (slib.krebs.genipv6 "wiregrill" "lass" ip).address;
2022-12-26 22:45:25 +00:00
hostFiles =
builtins.map (lib.removeSuffix ".nix") (
builtins.filter
(x: lib.hasSuffix ".nix" x && x != "default.nix")
(lib.attrNames (builtins.readDir ./.))
);
in {
2018-01-15 23:00:58 +00:00
dns.providers = {
"lassul.us" = "zones";
};
2023-06-10 10:50:53 +00:00
hosts = lib.mapAttrs (_: lib.recursiveUpdate {
owner = config.krebs.users.lass;
2022-11-15 14:48:15 +00:00
consul = true;
2023-09-07 10:26:31 +00:00
ci = false;
monitoring = true;
2022-12-26 22:45:25 +00:00
}) (
2023-06-10 10:50:53 +00:00
lib.genAttrs hostFiles (host: import (./. + "/${host}.nix") {
inherit config lib r6 w6;
inherit (slib) krebs;
})
2022-12-26 22:45:25 +00:00
);
2023-10-05 19:25:19 +00:00
users = {
lass = {
2023-07-06 18:26:25 +00:00
mail = "lass@green.r";
2019-10-14 11:11:31 +00:00
pubkey = builtins.readFile ./ssh/yubikey.rsa;
pgp.pubkeys.default = builtins.readFile ./pgp/yubikey.pgp;
};
};
}