blob: 84e8669c027c2b87440215c93f28ac18a7bdfdde (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
};
}
|