1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

swaylock: fix path values in config file (#6786)

This commit is contained in:
Gaétan Lepage 2025-04-09 15:22:57 +02:00 committed by GitHub
parent 4040c5779c
commit fcb8a2b62b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,7 +74,12 @@ in
xdg.configFile."swaylock/config" = lib.mkIf (cfg.settings != { }) {
text = lib.concatStrings (
lib.mapAttrsToList (
n: v: if v == false then "" else (if v == true then n else n + "=" + builtins.toString v) + "\n"
n: v:
if v == false then
""
else
(if v == true then n else n + "=" + (if builtins.isPath v then "${v}" else builtins.toString v))
+ "\n"
) cfg.settings
);
};