blob: 964fd054a314838f562aed7237121aee526fee57 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{ config, lib, pkgs, ... }:
let
cfg = config.gog;
self = rec {
callPackage = pkgs.lib.callPackageWith (pkgs // self);
callPackage_i686 = pkgs.lib.callPackageWith (pkgs.pkgsi686Linux // self);
fetchGog = callPackage ./fetch-gog {
inherit (config.gog) email password;
};
albion = callPackage_i686 ./albion {};
crosscode = callPackage ./crosscode.nix {};
dungeons3 = callPackage ./dungeons3.nix {};
overload = callPackage ./overload.nix {};
party-hard = callPackage ./party-hard.nix {};
satellite-reign = callPackage ./satellite-reign.nix {};
settlers2 = callPackage ./settlers2.nix {};
stardew-valley = callPackage ./stardew-valley.nix {};
thimbleweed-park = callPackage ./thimbleweed-park.nix {};
war-for-the-overworld = callPackage ./war-for-the-overworld.nix {};
wizard-of-legend = callPackage ./wizard-of-legend.nix {};
xeen = callPackage ./xeen.nix {};
};
in {
options.gog = {
email = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
Email address for your GOG account.
'';
};
password = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
Password for your GOG account.
<note><para>This will end up in the Nix store and other users on the
same machine can read it!</para></note>
'';
};
};
config.packages = {
gog = lib.mkIf (cfg.email != null && cfg.password != null) self;
};
}
|