This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

configs.kartei: take hosts from kartei input, own users from keys/

+70 -3
+1 -1
configs/default.nix
··· 36 36 # Import stockholm modules 37 37 self.inputs.stockholm.nixosModules.users 38 38 self.inputs.stockholm.nixosModules.hosts 39 - self.inputs.stockholm.nixosModules.kartei 39 + ./kartei.nix 40 40 self.inputs.stockholm.nixosModules.build 41 41 self.inputs.stockholm.nixosModules.dns 42 42 self.inputs.stockholm.nixosModules.iptables
+62
configs/kartei.nix
··· 1 + # krebs.hosts and foreign krebs.users from the kartei flake input, instead 2 + # of stockholm's nixosModules.kartei (which pins its own kartei submodule). 3 + # Our own users are defined here from ../keys, not taken from kartei. 4 + { 5 + config, 6 + lib, 7 + self, 8 + ... 9 + }: 10 + let 11 + inherit (self.inputs) kartei; 12 + 13 + # Host flag that is stockholm policy (krebs/3modules/kartei/overlay.nix), 14 + # not kartei data, still read by configs/consul.nix (retry_join). 15 + consulHosts = [ 16 + "aergia" 17 + "blue" 18 + "coaxmetal" 19 + "daedalus" 20 + "green" 21 + "icarus" 22 + "ignavia" 23 + "littleT" 24 + "massulus" 25 + "neoprism" 26 + "orange" 27 + "radio" 28 + "shodan" 29 + "skynet" 30 + "styx" 31 + "ubik" 32 + "yellow" 33 + ]; 34 + 35 + ownUsers = { 36 + lass = { 37 + mail = "lass@green.r"; 38 + pgp.pubkeys.default = builtins.readFile ../keys/pgp/yubi_pgp.pgp; 39 + pubkey = lib.removeSuffix "\n" (builtins.readFile ../keys/ssh/yubi_pgp.pub); 40 + }; 41 + }; 42 + in 43 + { 44 + krebs.hosts = lib.mapAttrs ( 45 + name: host: 46 + removeAttrs host [ "owner" ] 47 + // { 48 + # hosts may be owned by users without a kartei record; the krebs.users 49 + # type fills in all defaults from the name alone 50 + owner = config.krebs.users.${host.owner} or { name = host.owner; }; 51 + consul = lib.elem name consulHosts; 52 + } 53 + ) kartei.hosts; 54 + 55 + # drop null fields so other modules (e.g. stockholm's users.nix for the 56 + # krebs user) can define them without conflicting definitions 57 + krebs.users = 58 + lib.mapAttrs (_: lib.filterAttrs (_: v: v != null)) ( 59 + removeAttrs kartei.users (lib.attrNames ownUsers) 60 + ) 61 + // ownUsers; 62 + }
+7 -2
machines/xerxes/config.nix
··· 1 - { self, pkgs, ... }: 1 + { 2 + self, 3 + config, 4 + pkgs, 5 + ... 6 + }: 2 7 { 3 8 imports = [ 4 9 ../../configs ··· 31 36 32 37 boot.tmp.cleanOnBoot = true; 33 38 34 - krebs.build.host = self.inputs.stockholm.kartei.hosts.xerxes; 39 + krebs.build.host = config.krebs.hosts.xerxes; 35 40 36 41 environment.systemPackages = [ 37 42 pkgs.bitwarden-desktop