{
  description = "TFC Website";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    rust-overlay.url = "github:oxalica/rust-overlay";
    naersk.url = "github:nix-community/naersk";
  };

  outputs = inputs: with inputs;
    flake-utils.lib.eachDefaultSystem
      (system:
        let
          pkgs = nixpkgs.legacyPackages.${system};
          src = ./.;

          naersk' = pkgs.callPackage naersk {};

          nbi = with pkgs; [
            gcc
            stdenv
            gnumake
            gdb
            pkg-config
            makeWrapper
            openssl
            openssl.out
            openssl.dev
          ];

          bi = with pkgs; [
            git
            clippy
            rustc
            cargo
            rustfmt
            rust-analyzer
            just
            zola

            # web lang tweaks
            tailwindcss_4
            # postcss-cli
            uglify-js

            openssl
            openssl.out
            openssl.dev
          ];

          nativeLibs = with pkgs; [
            openssl
            openssl.out
            openssl.dev
          ];

          site = pkgs.stdenv.mkDerivation rec {
            name = "site";
            version = "2.0.0";
            src = ./.;
            # configurePhase = ''
            #   ls
            #   mkdir -p themes
            #   ls themes
            #   cp -r ${blowfish} themes/blowfish
            #   ls themes/blowfish
            # '';
            # buildPhase = ''
            #   NODE_ENV=production ./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit && hugo --gc --minify
            #   ${pkgs.hugo}/bin/hugo --minify
            # '';
            # installPhase = ''
            #   ls -l
            #   cp -r public $out/
            #   ls -l $out
            # '';
            buildInputs = bi;
            nativeBuildInputs = nbi;
          };
          
        in 
        {
          devShell = pkgs.mkShell {
            name = "tfc-api";
            version = "0.0.1";
            src = src;
            nativeBuildInputs = nbi;
            buildInputs = bi;
            nativeLibs = nativeLibs;
          };
          packages.default = naersk'.buildPackage {
            pname = "tfcapi";
            version = "0.0.1";
            src = ./.;
            cargoBuildFlags = "";
            doCheck = false;

            # cargoLock = {
            #   lockFile = ./Cargo.lock;
            # };
            nativeBuildInputs = nbi;
            buildInputs = bi;
            fixupPhase = ''
              ls -l
              mkdir -p $out/public
              ls -l $out
              cp -r ${site}/* $out/public/
              ls -l $out
            '';
          };
          packages.site = site;
        }
      );
}