Skip to content

Commit 9946d3e

Browse files
committed
fix mullvad location set
1 parent ec1df68 commit 9946d3e

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

modules/mullvad.nix

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ in {
2525
};
2626

2727
location = mkOption {
28-
type = types.str;
29-
default = "";
30-
example = "us nyc";
28+
type = types.listOf types.str;
29+
default = [];
30+
example = ["us" "nyc"];
3131
description = ''
32-
Mullvad server location as a space-separated string.
33-
Format: "country city" or "country" (e.g., "us nyc", "se got", "us").
32+
Mullvad server location as a list of strings.
33+
Format: ["country"] | ["country" "city"] | ["country" "city" "full-server-name"] | ["full-server-name"]
34+
Examples: ["us"], ["us" "nyc"], ["se" "got" "se-got-wg-001"], ["se-got-wg-001"]
3435
Use "mullvad relay list" to see available locations.
3536
Leave empty to use automatic location selection.
3637
'';
@@ -115,8 +116,8 @@ in {
115116
${mullvadPkg}/bin/mullvad lockdown-mode set off
116117
''}
117118
118-
${optionalString (cfg.location != "") ''
119-
${mullvadPkg}/bin/mullvad relay set location ${cfg.location}
119+
${optionalString (cfg.location != []) ''
120+
${mullvadPkg}/bin/mullvad relay set location ${escapeShellArgs cfg.location}
120121
''}
121122
122123
${optionalString cfg.autoConnect ''

0 commit comments

Comments
 (0)