Skip to content

Commit 2234999

Browse files
nixos/kanidm: add home_mount_prefix to BindPaths if set (#382915)
2 parents cc594f9 + 2f45486 commit 2234999

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

nixos/modules/services/security/kanidm.nix

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -855,12 +855,16 @@ in
855855
User = "kanidm";
856856
Group = "kanidm";
857857

858-
BindPaths = [
859-
# To create the socket
860-
"/run/kanidmd:/run/kanidmd"
861-
# To store backups
862-
cfg.serverSettings.online_backup.path
863-
];
858+
BindPaths =
859+
[
860+
# To create the socket
861+
"/run/kanidmd:/run/kanidmd"
862+
# To store backups
863+
cfg.serverSettings.online_backup.path
864+
]
865+
++ optional (
866+
cfg.enablePam && cfg.unixSettings ? home_mount_prefix
867+
) cfg.unixSettings.home_mount_prefix;
864868

865869
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
866870
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];

0 commit comments

Comments
 (0)