blob: 03e6b180fe10cbd10973880dde4f216d2bfa14a8 (
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
36
37
38
|
{ config, lib, pkgs, ... }:
let
cfg = config.steam;
self = rec {
callPackage = pkgs.lib.callPackageWith (pkgs // self);
fetchSteam = callPackage ./fetchsteam {
inherit (config.steam) username password;
};
starbound = callPackage ./starbound.nix { flavor = "stable"; };
starbound-unstable = callPackage ./starbound.nix { flavor = "unstable"; };
};
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;
};
}
|