stockholm/kartei/lass/default.nix

62 lines
1.7 KiB
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;
ci = true;
monitoring = true;
2022-12-27 17:03:51 +00:00
ssh.privkey.path = <secrets/ssh.id_ed25519>;
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
);
2018-05-16 18:19:08 +00:00
users = rec {
2021-02-16 18:50:25 +00:00
lass = lass-yubikey;
2019-10-14 11:11:31 +00:00
lass-yubikey = {
2021-02-18 19:16:07 +00:00
mail = "lass@lassul.us";
2019-10-14 11:11:31 +00:00
pubkey = builtins.readFile ./ssh/yubikey.rsa;
pgp.pubkeys.default = builtins.readFile ./pgp/yubikey.pgp;
};
2018-05-16 18:19:08 +00:00
lass-blue = {
mail = "lass@blue.r";
pubkey = builtins.readFile ./ssh/blue.rsa;
};
2021-01-23 16:33:17 +00:00
lass-green = {
mail = "lass@green.r";
pubkey = builtins.readFile ./ssh/green.ed25519;
};
2022-12-26 22:45:25 +00:00
lass-red = {
mail = "lass@red.r";
pubkey = builtins.readFile ./ssh/red.ed25519;
};
2018-05-16 18:19:08 +00:00
lass-mors = {
2017-04-12 09:00:36 +00:00
mail = "lass@mors.r";
2016-05-21 11:45:48 +00:00
pubkey = builtins.readFile ./ssh/mors.rsa;
pgp.pubkeys.default = builtins.readFile ./pgp/mors.pgp;
};
2017-10-01 16:39:14 +00:00
lass-android = {
mail = "lassulus@gmail.com";
2021-05-24 20:15:09 +00:00
pubkey = builtins.readFile ./ssh/android.ed25519;
2017-10-01 16:39:14 +00:00
};
2021-11-27 22:48:41 +00:00
lass-tablet = {
pubkey = builtins.readFile ./ssh/tablet.ed25519;
};
};
}