Loading nixos/modules/services/web-apps/c2fmzq-server.nix +5 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ let argsFormat = { type = with lib.types; attrsOf (nullOr (oneOf [ bool int str ])); generate = lib.cli.toGNUCommandLineShell { }; generate = lib.cli.toGNUCommandLineShell { mkBool = k: v: [ "--${k}=${if v then "true" else "false"}" ]; }; }; in { options.services.c2fmzq-server = { Loading nixos/tests/c2fmzq.nix +4 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { # make sure multiple freeform options evaluate allow-new-accounts = true; auto-approve-new-accounts = true; licenses = false; }; }; environment = { Loading Loading @@ -74,5 +75,8 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { with subtest("Test that PWA is served"): msg = machine.succeed("curl -sSfL http://localhost:8080") assert "c2FmZQ" in msg, f"Could not find 'c2FmZQ' in the output:\n{msg}" with subtest("A setting with false value is properly passed"): machine.succeed("systemctl show -p ExecStart --value c2fmzq-server.service | grep -F -- '--licenses=false'"); ''; }) Loading
nixos/modules/services/web-apps/c2fmzq-server.nix +5 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ let argsFormat = { type = with lib.types; attrsOf (nullOr (oneOf [ bool int str ])); generate = lib.cli.toGNUCommandLineShell { }; generate = lib.cli.toGNUCommandLineShell { mkBool = k: v: [ "--${k}=${if v then "true" else "false"}" ]; }; }; in { options.services.c2fmzq-server = { Loading
nixos/tests/c2fmzq.nix +4 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { # make sure multiple freeform options evaluate allow-new-accounts = true; auto-approve-new-accounts = true; licenses = false; }; }; environment = { Loading Loading @@ -74,5 +75,8 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { with subtest("Test that PWA is served"): msg = machine.succeed("curl -sSfL http://localhost:8080") assert "c2FmZQ" in msg, f"Could not find 'c2FmZQ' in the output:\n{msg}" with subtest("A setting with false value is properly passed"): machine.succeed("systemctl show -p ExecStart --value c2fmzq-server.service | grep -F -- '--licenses=false'"); ''; })