diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/default.nix b/default.nix index d85bd191..68a66670 100644 --- a/default.nix +++ b/default.nix @@ -1,25 +1,16 @@ -{ configuration ? null }: +{ system ? builtins.currentSystem, ... }@args: -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"; +with (import (import ./nixpkgs-path.nix) { inherit system; }).lib; - 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: +{ + machines = import ./machines { + inherit system; + }; - { - humblebundle.email = "fancyuser@example.com"; - humblebundle.password = "my_super_secret_password"; - } - '' else configFilePath; + pkgs = import ./pkgs { + pkgs = import (import ./nixpkgs-path.nix) args; + }; -in ((import <nixpkgs/lib>).evalModules { - modules = [ - (if configuration == null then configFilePath else configuration) - ./base-module.nix ./humblebundle ./steam - ]; -}).config.packages + # Inherit upstream lib until we have our own lib. + lib = import "${import ./nixpkgs-path.nix}/lib"; +} |