Set some defaults for export

This commit is contained in:
niten 2024-06-02 15:57:56 -07:00
parent 2e58abb4cf
commit 33530f5f98
2 changed files with 14 additions and 4 deletions

View File

@ -1,9 +1,17 @@
{ helper-lib, ... }: { helper-lib, lib, ... }:
let import-by-basename = helper-lib.fs.import-by-basename; with lib;
let
inherit (helper-lib.fs) import-by-basename;
withDefaults = defaults: mapAttrs (_: opts: defaults // opts);
in { in {
domains = import-by-basename ./domains; domains = import-by-basename ./domains;
hosts = import-by-basename ./hosts; hosts = withDefaults {
nixos-system = true;
fudo-system = true;
profile = "server";
hardened = false;
} (import-by-basename ./hosts);
nexus.domains = import-by-basename ./nexus; nexus.domains = import-by-basename ./nexus;
sites = import-by-basename ./sites; sites = import-by-basename ./sites;
zones = import-by-basename ./zones; zones = import-by-basename ./zones;

View File

@ -9,7 +9,9 @@
entities = { imports = [ ./module.nix ]; }; entities = { imports = [ ./module.nix ]; };
}; };
entities = let helper-lib = fudo-lib.lib { pkgs = nixpkgs; }; entities = let
inherit (nixpkgs) lib;
helper-lib = fudo-lib.lib { pkgs = nixpkgs; };
in import ./entities.nix { inherit helper-lib; }; in import ./entities.nix { inherit helper-lib; };
lib = import ./lib.nix { lib = import ./lib.nix {