diff --git a/modules/programs/khal/default.nix b/modules/programs/khal/default.nix index 65f8f02a5..b0cdc7575 100644 --- a/modules/programs/khal/default.nix +++ b/modules/programs/khal/default.nix @@ -58,7 +58,7 @@ let "[[${name}]]" "path = ${ value.local.path - + "/" # TODO: dont add slash if type is "singlefile" + + (if value.local.type == "singlefile" then "" else "/") + (optionalString (value.khal.type == "discover") value.khal.glob) + (optionalString ( value.khal.type == "birthdays" && value.khal ? thisCollection diff --git a/tests/modules/programs/khal/khal-config-expected b/tests/modules/programs/khal/khal-config-expected index 274c2795a..7c8cbca56 100644 --- a/tests/modules/programs/khal/khal-config-expected +++ b/tests/modules/programs/khal/khal-config-expected @@ -8,6 +8,15 @@ type=calendar +[[testSinglefile]] +path = $XDG_CONFIG_HOME/cal/timetable.ics +readonly = True +addresses= study@university.edu +priority=10 +type=calendar + + + [[testWithAddresss]] path = /home/hm-user/$XDG_CONFIG_HOME/cal/testWithAddresss/ addresses= john.doe@email.com @@ -23,13 +32,6 @@ priority=10 type=calendar -[[testSinglefile]] -path = $XDG_CONFIG_HOME/cal/timetable.ics -readonly = True -addresses= study@university.edu -priority=10 -type=calendar - [[testcontacts-automaticallyCollected]] path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/automaticallyCollected