From 632eef6424d8dc8d40c2906177892697679e7b85 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 19 Apr 2025 12:36:38 +0200 Subject: Add ZIG server --- flake.nix | 63 +++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 18 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 325ed60..6cc8636 100644 --- a/flake.nix +++ b/flake.nix @@ -1,21 +1,48 @@ { - inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; - }; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + zig = { + url = "github:mitchellh/zig-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; + }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem - (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in { devShell = pkgs.mkShell { - buildInputs = with pkgs; [ - nodePackages.typescript - python3 - psmisc # fuser - esbuild - watchexec - ]; - }; } - ); + outputs = { self, nixpkgs, flake-utils, zig, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ + (final: prev: { + zigpkgs = zig.packages.${prev.system}; + }) + ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + in + with pkgs; + { + devShell = mkShell { + buildInputs = [ + # Common + watchexec + + # Frontend + esbuild + nodePackages.typescript + dart-sass + + # Backend + psmisc # fuser + sqlite + zigpkgs.master + + # Tooling + tmux + tmuxinator + ]; + }; + } + ); } -- cgit v1.2.3