lab/tailwindcss/flake.nix

42 lines
1,007 B
Nix

{
inputs = {
devshell.inputs.nixpkgs.follows = "nixpkgs";
devshell.url = "github:numtide/devshell";
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = [ inputs.devshell.flakeModule ];
perSystem =
{ pkgs, ... }:
{
devshells.default = {
packages = [
(pkgs.writeShellApplication {
name = "serve";
runtimeInputs = with pkgs; [
simple-http-server
tailwindcss_4
watchman
];
text = ''
simple-http-server --index --nocache "$@" & \
tailwindcss --output tailwind.css --watch & \
wait
'';
})
];
};
};
};
}