flake: export top level krebs modules via nixosModules

This commit is contained in:
Kierán Meinhardt 2023-06-09 13:37:20 +02:00 committed by tv
parent e174ef53ca
commit a59af9e4ca

View File

@ -21,6 +21,17 @@
./krebs/1systems/hotdog/config.nix
];
};
nixosModules =
let
inherit (nixpkgs) lib;
in builtins.listToAttrs
(map
(name: {name = lib.removeSuffix ".nix" name; value = import (./krebs/3modules + "/${name}");})
(lib.filter
(name: name != "default.nix" && !lib.hasPrefix "." name)
(lib.attrNames (builtins.readDir ./krebs/3modules))));
kartei = {
hosts = self.nixosConfigurations.hotdog.config.krebs.hosts;
users = self.nixosConfigurations.hotdog.config.krebs.users;