Skip to content

Commit

Permalink
Switch to process-compose-flake
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Aug 25, 2024
1 parent d118871 commit 307f812
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 40 deletions.
34 changes: 9 additions & 25 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";

flake-root.url = "github:srid/flake-root";
proc-flake.url = "github:srid/proc-flake";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
fourmolu-nix.url = "github:jedimahdi/fourmolu-nix";
Expand All @@ -20,12 +19,11 @@
systems = import inputs.systems;
imports = [
inputs.haskell-flake.flakeModule
inputs.flake-root.flakeModule
inputs.proc-flake.flakeModule
inputs.process-compose-flake.flakeModule
inputs.treefmt-nix.flakeModule
inputs.fourmolu-nix.flakeModule
];
perSystem = { config, pkgs, lib, ... }:
perSystem = { config, self', pkgs, lib, ... }:
let
tailwind = pkgs.haskellPackages.tailwind;
in
Expand All @@ -41,8 +39,7 @@
# Auto formatters. This also adds a flake check to ensure that the
# source tree was auto formatted.
treefmt.config = {
inherit (config.flake-root) projectRootFile;
package = pkgs.treefmt;
projectRootFile = "flake.nix";

programs.fourmolu.enable = true;
programs.nixpkgs-fmt.enable = true;
Expand All @@ -65,11 +62,16 @@
extensions = [ "ImportQualifiedPost" ];
};

# From https://github.com/srid/proc-flake
proc.groups.ema-tailwind-run = {
processes = {
haskell.command = "ghcid";
tailwind.command = "${lib.getExe tailwind} -w -o ./static/tailwind.css './src/**/*.hs'";
process-compose."ema-tailwind-run" = {
tui = false;
settings = {
processes = {
haskell.command = "ghcid";
tailwind = {
command = "${lib.getExe tailwind} -w -o ./static/tailwind.css './src/**/*.hs'";
is_tty = true;
};
};
};
};

Expand Down Expand Up @@ -100,12 +102,10 @@
tailwind
pkgs.just
pkgs.nixd
config.proc.groups.ema-tailwind-run.package
];
inputsFrom = [
config.haskellProjects.default.outputs.devShell
config.treefmt.build.devShell
config.flake-root.devShell
];
};
};
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ fmt:

# Run the dev server (ghcid + tailwind)
run:
ema-tailwind-run
nix run .#ema-tailwind-run

0 comments on commit 307f812

Please sign in to comment.