From 33530f5f98b2a76a8b6e6afe9d31232410351d7d Mon Sep 17 00:00:00 2001 From: niten Date: Sun, 2 Jun 2024 15:57:56 -0700 Subject: [PATCH] Set some defaults for export --- entities.nix | 14 +++++++++++--- flake.nix | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/entities.nix b/entities.nix index f650af7..c58114b 100644 --- a/entities.nix +++ b/entities.nix @@ -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 { 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; sites = import-by-basename ./sites; zones = import-by-basename ./zones; diff --git a/flake.nix b/flake.nix index e6c871d..4a12175 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,9 @@ 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; }; lib = import ./lib.nix {