diff options
Diffstat (limited to 'steam/default.nix')
-rw-r--r-- | steam/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/steam/default.nix b/steam/default.nix new file mode 100644 index 00000000..84e8669c --- /dev/null +++ b/steam/default.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.steam; + + self = rec { + callPackage = pkgs.lib.callPackageWith (pkgs // self); + + fetchSteam = callPackage ./fetchsteam { + inherit (config.steam) username password; + }; + }; +in with lib; { + options.steam = { + username = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + User name for your Steam account. + ''; + }; + + password = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Password for your Steam account. + ''; + }; + }; + + config.packages = { + steam = mkIf (cfg.username != null && cfg.password != null) self; + }; +} |