diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-02-05 06:01:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 06:01:04 +0000 |
commit | 0f22335f7dc84912837bc8bfdb7e649f35fea19b (patch) | |
tree | e44a5683051e92620d003402ecea333708b78255 /nixos | |
parent | 9b62c8500482f03fc703198058a5d0f58e5ec4b8 (diff) | |
parent | 0a254180b4cad6be45aa46dce896bdb8db5d2930 (diff) | |
download | nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.tar nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.tar.gz nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.tar.bz2 nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.tar.lz nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.tar.xz nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.tar.zst nixlib-0f22335f7dc84912837bc8bfdb7e649f35fea19b.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/games/archisteamfarm.nix | 11 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/urn-timer.nix | 26 |
3 files changed, 35 insertions, 3 deletions
diff --git a/nixos/modules/services/games/archisteamfarm.nix b/nixos/modules/services/games/archisteamfarm.nix index 293e341bef38..c00ae8116b39 100644 --- a/nixos/modules/services/games/archisteamfarm.nix +++ b/nixos/modules/services/games/archisteamfarm.nix @@ -20,10 +20,11 @@ let mkBot = n: c: format.generate "${n}.json" (c.settings // { SteamLogin = if c.username == "" then n else c.username; + Enabled = c.enabled; + } // lib.optionalAttrs (c.passwordFile != null) { SteamPassword = c.passwordFile; # sets the password format to file (https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Security#file) PasswordFormat = 4; - Enabled = c.enabled; }); in { @@ -127,8 +128,12 @@ in default = ""; }; passwordFile = lib.mkOption { - type = lib.types.path; - description = lib.mdDoc "Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group."; + type = with lib.types; nullOr path; + default = null; + description = lib.mdDoc '' + Path to a file containing the password. The file must be readable by the `archisteamfarm` user/group. + Omit or set to null to provide the password a different way, such as through the web-ui. + ''; }; enabled = lib.mkOption { type = lib.types.bool; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 66c29092cb6d..c2114098fe05 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -934,6 +934,7 @@ in { upnp.nftables = handleTest ./upnp.nix { useNftables = true; }; uptermd = handleTest ./uptermd.nix {}; uptime-kuma = handleTest ./uptime-kuma.nix {}; + urn-timer = handleTest ./urn-timer.nix {}; usbguard = handleTest ./usbguard.nix {}; user-activation-scripts = handleTest ./user-activation-scripts.nix {}; user-expiry = runTest ./user-expiry.nix; diff --git a/nixos/tests/urn-timer.nix b/nixos/tests/urn-timer.nix new file mode 100644 index 000000000000..10c5bef49b5b --- /dev/null +++ b/nixos/tests/urn-timer.nix @@ -0,0 +1,26 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "urn-timer"; + meta = with pkgs.lib.maintainers; { + maintainers = [ fgaz ]; + }; + + nodes.machine = { config, pkgs, ... }: { + imports = [ + ./common/x11.nix + ]; + + services.xserver.enable = true; + environment.systemPackages = [ pkgs.urn-timer ]; + }; + + enableOCR = true; + + testScript = + '' + machine.wait_for_x() + machine.execute("urn-gtk ${pkgs.urn-timer.src}/splits_examples/sotn.json >&2 &") + machine.wait_for_window("urn") + machine.wait_for_text(r"(Mist|Bat|Reverse|Dracula)") + machine.screenshot("screen") + ''; +}) |