diff --git a/sculpin/.envrc b/sculpin/.envrc index 3550a30f2..a5dbbcba7 100644 --- a/sculpin/.envrc +++ b/sculpin/.envrc @@ -1 +1 @@ -use flake +use flake . diff --git a/sculpin/.tmux-sessionizer b/sculpin/.tmux-sessionizer index 4e01b949d..ff51a7bf9 100755 --- a/sculpin/.tmux-sessionizer +++ b/sculpin/.tmux-sessionizer @@ -3,10 +3,8 @@ PATH="${PATH}:./vendor/bin" tmux new-window -dn scratch -tmux new-window -dn sculpin -tmux new-window -dn tailwind +tmux new-window -dn server -tmux send-keys -t sculpin "sculpin generate --server --watch" Enter -tmux send-keys -t tailwind "cd assets && tailwindcss --input css/tailwind.css --output ../source/build/tailwind.css --watch" Enter +tmux send-keys -t server "./watch" Enter nvim . diff --git a/sculpin/flake.nix b/sculpin/flake.nix index 48d72aae6..0f78332df 100644 --- a/sculpin/flake.nix +++ b/sculpin/flake.nix @@ -1,20 +1,27 @@ { - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs = { + devshell.url = "github:numtide/devshell"; + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; - outputs = inputs: - let - system = "x86_64-linux"; - pkgs = import inputs.nixpkgs { inherit system; }; - in - { - devShells.${system}.default = - with pkgs; - mkShell { - buildInputs = [ - nodePackages.browser-sync - php - phpPackages.composer - ]; + outputs = + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ inputs.devshell.flakeModule ]; + + systems = [ "x86_64-linux" ]; + + perSystem = + { pkgs, ... }: + { + devshells.default = { + packages = with pkgs; [ + nodePackages.browser-sync + php + phpPackages.composer + ]; + }; }; }; } diff --git a/storybook/.envrc b/storybook/.envrc index 3550a30f2..a5dbbcba7 100644 --- a/storybook/.envrc +++ b/storybook/.envrc @@ -1 +1 @@ -use flake +use flake . diff --git a/storybook/.tmux-sessionizer b/storybook/.tmux-sessionizer new file mode 100755 index 000000000..09906d44d --- /dev/null +++ b/storybook/.tmux-sessionizer @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +: "${NODE_ENV:=development}" + +tmux new-window -dn scratch +tmux new-window -dn server + +tmux send-keys -t server "./watch" Enter + +nvim . diff --git a/storybook/flake.nix b/storybook/flake.nix index a1ec7980e..e8c3db214 100644 --- a/storybook/flake.nix +++ b/storybook/flake.nix @@ -1,19 +1,26 @@ { - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs = { + devshell.url = "github:numtide/devshell"; + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; - outputs = inputs: - let - system = "x86_64-linux"; - pkgs = import inputs.nixpkgs { inherit system; }; - in - { - devShells.${system}.default = - with pkgs; - mkShell { - buildInputs = [ - nodejs - nodePackages.npm - ]; + outputs = + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ inputs.devshell.flakeModule ]; + + systems = [ "x86_64-linux" ]; + + perSystem = + { pkgs, ... }: + { + devshells.default = { + packages = with pkgs; [ + nodejs + nodePackages.npm + ]; + }; }; }; } diff --git a/storybook/watch b/storybook/watch index 03deaf23e..93d96c873 100755 --- a/storybook/watch +++ b/storybook/watch @@ -4,7 +4,7 @@ set -euo pipefail export PATH="$PATH:./node_modules/.bin" -NODE_ENV="${NODE_ENV:-development}" +: "${NODE_ENV:=development}" storybook dev \ --exact-port \