diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-02-08 22:15:55 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-02-08 22:15:55 +0100 |
commit | 3c6c1392de4ee4a6c0bb13cb7908f9304d6dd053 (patch) | |
tree | 8eb7abf04eb250e5337c90acb69103adaeeef422 /pkgs/games/default.nix | |
parent | 42c3024877bbdd127e7002e35f41cd87aaf792f7 (diff) | |
parent | 5570ec94ffe086f1ff47ad99606d39eb7b815dd1 (diff) |
Merge aszlig/nixgames into vuizvui
This is a subtree merge of the full nixgames repository including history. Right now it isn't linked to vuizvui at all but we're going to do that very soon. The reason why I'm merging both repositories together is that it's easier for me to manage updates and also facilitate contributions by people from the OpenLab. Another reason to merge it is that we can write more generic functions for building both, the games and the rest. Right now the licensing is still the Apache License version 2.0, but we're going to change it to the vuizvui license as well.
Diffstat (limited to 'pkgs/games/default.nix')
-rw-r--r-- | pkgs/games/default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/games/default.nix b/pkgs/games/default.nix new file mode 100644 index 00000000..d85bd191 --- /dev/null +++ b/pkgs/games/default.nix @@ -0,0 +1,25 @@ +{ configuration ? null }: + +let + configFilePath = let + xdgConfig = builtins.getEnv "XDG_CONFIG_HOME"; + fallback = "${builtins.getEnv "HOME"}/.config"; + basedir = if xdgConfig == "" then fallback else xdgConfig; + in "${basedir}/nixgames.nix"; + + configFile = if !builtins.pathExists configFilePath then throw '' + The config file "${configFilePath}" doesn't exist! Be sure to create it and + put your HumbleBundle email address and password in it, like this: + + { + humblebundle.email = "fancyuser@example.com"; + humblebundle.password = "my_super_secret_password"; + } + '' else configFilePath; + +in ((import <nixpkgs/lib>).evalModules { + modules = [ + (if configuration == null then configFilePath else configuration) + ./base-module.nix ./humblebundle ./steam + ]; +}).config.packages |