From f976e535645f0498324316998cb6e775a5cd21c3 Mon Sep 17 00:00:00 2001 From: Joachim Ernst Date: Wed, 6 Aug 2025 19:10:26 +0200 Subject: [PATCH] nixos/oxidized: allow for providing config by other means - especially usefull, when secrets are used in configFile and `replace-secret` or `scalpel` should be used --- nixos/modules/services/admin/oxidized.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/admin/oxidized.nix b/nixos/modules/services/admin/oxidized.nix index a00a5d388101..d581f1baa826 100644 --- a/nixos/modules/services/admin/oxidized.nix +++ b/nixos/modules/services/admin/oxidized.nix @@ -36,7 +36,7 @@ in }; configFile = lib.mkOption { - type = lib.types.path; + type = lib.types.nullOr lib.types.path; example = lib.literalExpression '' pkgs.writeText "oxidized-config.yml" ''' --- @@ -122,6 +122,8 @@ in }; }; + } + // lib.optionalAttrs (cfg.configFile != null) { "${cfg.dataDir}/.config/oxidized/config" = { "L+" = { argument = "${cfg.configFile}";