From b6371ad7d812612bf2126f27c1f2eb85c19a8dc0 Mon Sep 17 00:00:00 2001 From: Nikkuss Date: Sun, 15 Feb 2026 01:36:51 +0400 Subject: [PATCH] fix error --- nix/flakeModule.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/nix/flakeModule.nix b/nix/flakeModule.nix index 18e4045..fffad99 100644 --- a/nix/flakeModule.nix +++ b/nix/flakeModule.nix @@ -27,13 +27,19 @@ in default = pkgs: pkgs.prettier; description = "The formatter function to use for formatting sops file"; }; - nixosModule = mkOption { - type = types.deferredModule; - readOnly = true; - description = "NixOS module configuration for managing sops secrets."; + nixosModule = { + default = mkOption { + type = types.functionTo types.attrs; + default = host: { }; + description = "A function that takes a hostname and returns a NixOS module to apply to that host."; + }; + network = mkOption { + type = types.functionTo types.attrs; + default = { config, ... }: { }; + description = "A function that takes the NixOS configuration and returns a NixOS module to apply to the host based on its network configuration."; + }; }; }; - config = let secrets = builtins.fromJSON (builtins.readFile "${inputs.self}/${cfg.secretsDir}/secrets.json");