lol

Merge pull request #279479 from gepbird/c2fmzq-server-bool-setting-allow-false

nixos/c2fmzq-server: allow setting bool settings to false

authored by

Peder Bergebakken Sundt and committed by
GitHub
fa8616a4 f4755695

+9 -1
+5 -1
nixos/modules/services/web-apps/c2fmzq-server.nix
··· 7 7 8 8 argsFormat = { 9 9 type = with lib.types; attrsOf (nullOr (oneOf [ bool int str ])); 10 - generate = lib.cli.toGNUCommandLineShell { }; 10 + generate = lib.cli.toGNUCommandLineShell { 11 + mkBool = k: v: [ 12 + "--${k}=${if v then "true" else "false"}" 13 + ]; 14 + }; 11 15 }; 12 16 in { 13 17 options.services.c2fmzq-server = {
+4
nixos/tests/c2fmzq.nix
··· 12 12 # make sure multiple freeform options evaluate 13 13 allow-new-accounts = true; 14 14 auto-approve-new-accounts = true; 15 + licenses = false; 15 16 }; 16 17 }; 17 18 environment = { ··· 74 75 with subtest("Test that PWA is served"): 75 76 msg = machine.succeed("curl -sSfL http://localhost:8080") 76 77 assert "c2FmZQ" in msg, f"Could not find 'c2FmZQ' in the output:\n{msg}" 78 + 79 + with subtest("A setting with false value is properly passed"): 80 + machine.succeed("systemctl show -p ExecStart --value c2fmzq-server.service | grep -F -- '--licenses=false'"); 77 81 ''; 78 82 })