stockholm/kartei/lass/default.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

2023-06-10 12:50:53 +02:00
{ config, lib, ... }: let
slib = import ../../lib/pure.nix { inherit lib; };
2023-06-10 12:50:53 +02:00
r6 = ip: (slib.krebs.genipv6 "retiolum" "lass" ip).address;
w6 = ip: (slib.krebs.genipv6 "wiregrill" "lass" ip).address;
2022-12-26 23:45:25 +01:00
hostFiles =
builtins.map (lib.removeSuffix ".nix") (
builtins.filter
(x: lib.hasSuffix ".nix" x && x != "default.nix")
(lib.attrNames (builtins.readDir ./.))
);
in {
2018-01-16 00:00:58 +01:00
dns.providers = {
"lassul.us" = "zones";
};
2023-06-10 12:50:53 +02:00
hosts = lib.mapAttrs (_: lib.recursiveUpdate {
owner = config.krebs.users.lass;
2022-11-15 15:48:15 +01:00
consul = true;
2023-09-07 12:26:31 +02:00
ci = false;
monitoring = true;
2022-12-26 23:45:25 +01:00
}) (
2023-06-10 12:50:53 +02:00
lib.genAttrs hostFiles (host: import (./. + "/${host}.nix") {
inherit config lib r6 w6;
inherit (slib) krebs;
})
2022-12-26 23:45:25 +01:00
);
2018-05-16 20:19:08 +02:00
users = rec {
2021-02-16 19:50:25 +01:00
lass = lass-yubikey;
2019-10-14 13:11:31 +02:00
lass-yubikey = {
2023-07-06 20:26:25 +02:00
mail = "lass@green.r";
2019-10-14 13:11:31 +02:00
pubkey = builtins.readFile ./ssh/yubikey.rsa;
pgp.pubkeys.default = builtins.readFile ./pgp/yubikey.pgp;
};
2018-05-16 20:19:08 +02:00
lass-blue = {
mail = "lass@blue.r";
pubkey = builtins.readFile ./ssh/blue.rsa;
};
2021-01-23 17:33:17 +01:00
lass-green = {
mail = "lass@green.r";
pubkey = builtins.readFile ./ssh/green.ed25519;
};
2022-12-26 23:45:25 +01:00
lass-red = {
mail = "lass@red.r";
pubkey = builtins.readFile ./ssh/red.ed25519;
};
2018-05-16 20:19:08 +02:00
lass-mors = {
2017-04-12 11:00:36 +02:00
mail = "lass@mors.r";
2016-05-21 13:45:48 +02:00
pubkey = builtins.readFile ./ssh/mors.rsa;
pgp.pubkeys.default = builtins.readFile ./pgp/mors.pgp;
};
2017-10-01 18:39:14 +02:00
lass-android = {
mail = "lassulus@gmail.com";
2021-05-24 22:15:09 +02:00
pubkey = builtins.readFile ./ssh/android.ed25519;
2017-10-01 18:39:14 +02:00
};
2021-11-27 23:48:41 +01:00
lass-tablet = {
pubkey = builtins.readFile ./ssh/tablet.ed25519;
};
};
}