diff options
author | LRFLEW <LRFLEW@aol.com> | 2024-02-04 18:18:23 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 01:18:23 +0100 |
commit | 8b0d333f546d6247c0c846ffbc9f7e89b4d06022 (patch) | |
tree | f438ed0e459db5f15d7646b66a92a4c7e16344ea /nixos/modules/services/games | |
parent | d64c123c6db7ef64e8f358b230843778fdcd9c39 (diff) |
nixos/archisteamfarm: allow bots.*.passwordFile to be null (#284978)
* Make services.archisteamfarm.bots.*.passwordFile Nullable This adds support for alternate password specification methods, such as through the web-ui. * Update description for services.archisteamfarm.bots.*.passwordFile Adds note about omitting or setting to null to provide the password through the web-ui.
Diffstat (limited to 'nixos/modules/services/games')
-rw-r--r-- | nixos/modules/services/games/archisteamfarm.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/modules/services/games/archisteamfarm.nix b/nixos/modules/services/games/archisteamfarm.nix index 293e341bef385..c00ae8116b394 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; |