From a2b274ca80f9c1c197bd61ae6e07aa08efdccef4 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Tue, 28 Oct 2025 09:21:14 +0100 Subject: [PATCH] mod: do not import sops module in the default module --- docs/usage.md | 4 ++++ flake.nix | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index e0875d9..1d9253e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -27,6 +27,10 @@ imports = [ ]; ``` +If you use `sops-nix` for secrets, SHB provides an additional module, +not imported in the `default` module. It can be added by importing +`inputs.selfhostblocks.sops`. + Self Host Blocks provides its own `pkgs.lib` and `nixpkgs`. It is required to use the provided ones as input for your deployments, otherwise you might end up blocked when Self Host Blocks patches a module, function or package. diff --git a/flake.nix b/flake.nix index 079651a..cd1540b 100644 --- a/flake.nix +++ b/flake.nix @@ -65,7 +65,10 @@ { packages.manualHtml = pkgs.callPackage ./docs { inherit nmdsrc; - allModules = self.nixosModules.all.imports ++ contractDummyModules; + allModules = self.nixosModules.default.imports + ++ [ + self.nixosModules.sops + ] ++ contractDummyModules; release = builtins.readFile ./VERSION; substituteVersionIn = [ @@ -284,8 +287,7 @@ ) // { herculesCI.ciSystems = [ "x86_64-linux" ]; - nixosModules.default = self.nixosModules.all; - nixosModules.all = { + nixosModules.default = { imports = [ # blocks self.nixosModules.authelia @@ -298,7 +300,6 @@ self.nixosModules.postgresql self.nixosModules.restic self.nixosModules.ssl - self.nixosModules.sops self.nixosModules.tinyproxy self.nixosModules.vpn self.nixosModules.zfs