{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { devShell = pkgs.mkShell { packages = with pkgs; [ entr caddy (writeShellScriptBin "deploy" '' set -eu HOST="''${HOST-julia.blue}" DIR="''${DIR-/website}" cargo r -r rsync -a --info=progress2 .site/ "$HOST:$DIR" '') (writeShellScriptBin "preview" '' set -euo pipefail cargo r -r ln -sf assets .site/assets caddy run --config Caddyfile & readonly server_pid=$! trap 'kill -9 $server_pid; echo "goodbye 👋"' EXIT while sleep 1; do fd . assets/{pages,posts,projects,templates,} src | entr -d cargo r -r; done '') ]; TMTHEME="${pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "bat"; rev = "699f60fc8ec434574ca7451b444b880430319941"; hash = "sha256-6fWoCH90IGumAMc4buLRWL0N61op+AuMNN9CAR9/OdI="; }}/themes/Catppuccin Mocha.tmTheme"; # FONTS=[]; TODO: use ones from nix and copy them in the generator }; } ); }