blob: 122a6396d439e87d24e1d4c6544da09eae91a045 (
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
|
{ 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 { inherit (pkgs) buildSandbox; };
stardew-valley = callPackage ./stardew-valley.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;
};
}
|