mirror of
https://github.com/9001/copyparty.git
synced 2025-11-24 07:23:22 -07:00
nixos: Only create and bind volumes without variables
This commit is contained in:
parent
e9ab040ce8
commit
6f8e4b8dd1
|
|
@ -48,6 +48,8 @@ let
|
||||||
|
|
||||||
accountsWithPlaceholders = mapAttrs (name: attrs: passwordPlaceholder name);
|
accountsWithPlaceholders = mapAttrs (name: attrs: passwordPlaceholder name);
|
||||||
|
|
||||||
|
volumesWithoutVariables = filterAttrs (k: v: !(hasInfix "\${" v.path)) cfg.volumes;
|
||||||
|
|
||||||
configStr = ''
|
configStr = ''
|
||||||
${mkSection "global" cfg.settings}
|
${mkSection "global" cfg.settings}
|
||||||
${cfg.globalExtraConfig}
|
${cfg.globalExtraConfig}
|
||||||
|
|
@ -325,7 +327,7 @@ in
|
||||||
BindPaths =
|
BindPaths =
|
||||||
(if cfg.settings ? hist then [ cfg.settings.hist ] else [ ])
|
(if cfg.settings ? hist then [ cfg.settings.hist ] else [ ])
|
||||||
++ [ externalStateDir ]
|
++ [ externalStateDir ]
|
||||||
++ (mapAttrsToList (k: v: v.path) cfg.volumes);
|
++ (mapAttrsToList (k: v: v.path) volumesWithoutVariables);
|
||||||
# ProtectSystem = "strict";
|
# ProtectSystem = "strict";
|
||||||
# Note that unlike what 'ro' implies,
|
# Note that unlike what 'ro' implies,
|
||||||
# this actually makes it impossible to read anything in the root FS,
|
# this actually makes it impossible to read anything in the root FS,
|
||||||
|
|
@ -367,7 +369,7 @@ in
|
||||||
mode = ":755";
|
mode = ":755";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) cfg.volumes
|
) volumesWithoutVariables
|
||||||
);
|
);
|
||||||
|
|
||||||
users.groups = lib.mkIf (cfg.group == "copyparty") {
|
users.groups = lib.mkIf (cfg.group == "copyparty") {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue