nixos: Only create and bind volumes without variables (#962)

This commit is contained in:
Nicolas Mémeint 2025-11-02 13:59:48 +01:00 committed by GitHub
parent 3242145e52
commit 904c984bda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,6 +48,8 @@ let
accountsWithPlaceholders = mapAttrs (name: attrs: passwordPlaceholder name);
volumesWithoutVariables = filterAttrs (k: v: !(hasInfix "\${" v.path)) cfg.volumes;
configStr = ''
${mkSection "global" cfg.settings}
${cfg.globalExtraConfig}
@ -325,7 +327,7 @@ in
BindPaths =
(if cfg.settings ? hist then [ cfg.settings.hist ] else [ ])
++ [ externalStateDir ]
++ (mapAttrsToList (k: v: v.path) cfg.volumes);
++ (mapAttrsToList (k: v: v.path) volumesWithoutVariables);
# ProtectSystem = "strict";
# Note that unlike what 'ro' implies,
# this actually makes it impossible to read anything in the root FS,
@ -377,7 +379,7 @@ in
}";
};
}
) cfg.volumes
) volumesWithoutVariables
);
users.groups = lib.mkIf (cfg.group == "copyparty") {