aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix39
1 files changed, 36 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index 93d4f2e..d9dbbd9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -22,14 +22,27 @@
22 inputs = { 22 inputs = {
23 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 23 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
24 flake-utils.url = "github:numtide/flake-utils"; 24 flake-utils.url = "github:numtide/flake-utils";
25 flaky-utils.url = "git+https://cgit.pacien.net/libs/flaky-utils";
25 }; 26 };
26 27
27 outputs = { self, nixpkgs, flake-utils }: 28 outputs = { self, nixpkgs, flake-utils, flaky-utils }:
28 flake-utils.lib.eachDefaultSystem (system: let 29 flake-utils.lib.eachDefaultSystem (system: let
29 pkgs = import nixpkgs { inherit system; }; 30 pkgs = import nixpkgs { inherit system; };
30 ldgalleryVersion = "2.1"; 31 ldgalleryVersion = "2.1";
32 devTools = with pkgs; [
33 # generic
34 tmux
31 35
32 in rec { 36 # viewer
37 nodejs-16_x
38 yarn
39
40 # compiler
41 stack
42 ];
43
44 in pkgs.lib.fold pkgs.lib.recursiveUpdate { } [
45 (rec {
33 packages = rec { 46 packages = rec {
34 compiler = pkgs.haskell.lib.compose.overrideCabal (super: { 47 compiler = pkgs.haskell.lib.compose.overrideCabal (super: {
35 pname = "ldgallery-compiler"; 48 pname = "ldgallery-compiler";
@@ -138,5 +151,25 @@
138 151
139 default = ldgallery; 152 default = ldgallery;
140 }; 153 };
141 }); 154
155 devShell = flaky-utils.lib.mkDevShell {
156 inherit pkgs;
157 tools = devTools;
158 shell = null;
159 };
160 })
161
162 (flaky-utils.lib.mkSandboxSystem {
163 inherit nixpkgs system;
164 restrictNetwork = false;
165 patchQemu9p = true;
166 config = {
167 environment.systemPackages = devTools;
168 virtualisation.forwardPorts = [
169 { from = "host"; host.port = 8085; guest.port = 8085; } # vue-cli
170 ];
171 };
172 })
173
174 ]);
142} 175}