diff --git a/.gitignore b/.gitignore index 8e23cab..929e43a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ * -!site/ - !.gitignore !flake.lock diff --git a/build.sh b/build.sh index 74ed9d0..d1bd4b9 100755 --- a/build.sh +++ b/build.sh @@ -19,7 +19,7 @@ for file in $(find site -type f); do if [[ ! "$file" =~ ^_ ]]; then if [[ "$file" =~ .nix$ ]]; then echo "Processing file $file to _${file%.nix}.html..." - TARGET_FILE="$file" nix eval "$FLAKE_REF#result" --apply toString --raw > "_${file%.nix}.html" + TARGET_FILE=$(realpath "$file") nix eval "$FLAKE_REF#result" --impure --raw --apply toString > "_${file%.nix}.html" echo "Done!" else echo "Copying file $file to _$file..." diff --git a/flake.nix b/flake.nix index 8605f3d..f5e39d9 100644 --- a/flake.nix +++ b/flake.nix @@ -74,9 +74,6 @@ }; }; - result = let - targetFile = builtins.getEnv "TARGET_FILE"; - targetFile' = if targetFile != "" then targetFile else "site/index.nix"; - in builtins.scopedImport { inherit (self) raw __findFile; inherit lib; } ./${targetFile'}; + result = builtins.scopedImport { inherit (self) raw __findFile; inherit lib; } /${builtins.getEnv "TARGET_FILE"}; }; } diff --git a/site/index.nix b/site/index.nix deleted file mode 100644 index 0e052c2..0000000 --- a/site/index.nix +++ /dev/null @@ -1,9 +0,0 @@ - -
-"What the fuck is this?"<.p> - <.body> -<.html>