Add gssapi-realm to all domains

This commit is contained in:
niten 2023-01-17 13:30:45 -08:00
parent 0375d2c980
commit 2347610514
3 changed files with 19 additions and 10 deletions

View File

@ -8,6 +8,7 @@
admin-email = "niten@fudo.org";
zone = "sea.fudo.org";
gssapi-realm = "FUDO.ORG";
ldap-servers = [ "nutboy3" "legatus" ];

View File

@ -1,19 +1,19 @@
{
description = "Fudo Entities";
inputs = {
fudo-lib.url = "git+https://git.fudo.org/fudo-nix/lib.git";
};
inputs = { fudo-lib.url = "git+https://git.fudo.org/fudo-nix/lib.git"; };
outputs = { self, nixpkgs, fudo-lib, ... }: {
nixosModule = {
imports = [
./module.nix
];
nixosModule = { imports = [ ./module.nix ]; };
entities = let helper-lib = fudo-lib.lib { pkgs = nixpkgs; };
in import ./entities.nix { inherit helper-lib; };
lib = import ./lib {
inherit (nixpkgs) lib;
inherit (self) entities;
};
entities = let
helper-lib = fudo-lib.lib { pkgs = nixpkgs; };
in import ./entities.nix { inherit helper-lib; };
overlays.default = (final: prev: { lib = prev.lib // (self.lib); });
};
}

8
lib.nix Normal file
View File

@ -0,0 +1,8 @@
{ lib, entities, ... }:
let
getHostSite = hostname: entities.hosts."${hostname}".site;
getHostDomain = hostname: entities.domains."${hostname}".domain;
getHostRealm = hostname: (getHostDomain hostname).gssapi-realm;
in { inherit getHostSite getHostDomain getHostRealm; }