about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-09-08 19:20:28 +0200
committeraszlig <aszlig@nix.build>2020-09-08 19:43:53 +0200
commita95812654f47eae50aeba9f9da71ee9d1163e8bc (patch)
treef87af5b76d6e97ddf883ab7393dfceaa03fba876
parent59cc06e0fda0bf07e56ddb00808ccbcbb6372fc6 (diff)
Add basic flake.nix
Unfortunately, most of the functionality can't be easily exposed via Nix
Flakes, so this will be a very limited Flake with only our NixOS modules
and our packages as an overlay.

One of those things that are very hard to expose are our packaged games,
since the availability of them are dependent on the configuration (eg.
GOG, itch.io or HIB credentials).

Even when it comes to buildSandbox - which is the main reason why I'm
adding a flake.nix - I am not so sure what's the best way to expose it.

For example on one side, this could be exposed as
vuizvui.lib.buildSandbox, which in turn expects a pkgs argument, but on
the other side, we want to have certain other parts that *do* depend on
a locked version of nixpkgs. Using pkgs as part of a "lib" attribute
also sounds a bit weird to me, since lib usually doesn't contain
anything depending on stdenv.

So until we have a better way of integration, I'll just expose the
overlay and our NixOS modules.

Signed-off-by: aszlig <aszlig@nix.build>
-rw-r--r--flake.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 00000000..a235d3ca
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,8 @@
+{
+  description = "Vuizvui";
+
+  outputs = _: {
+    nixosModules.vuizvui = import modules/module-list.nix;
+    overlay = _: pkgs: { vuizvui = import ./pkgs { inherit pkgs; }; };
+  };
+}