about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authormarius <mail@marius.pm>2025-09-01 17:27:16 +0200
committermarius <mail@marius.pm>2025-09-01 17:27:16 +0200
commit0147e08d3d8bb364207666225d758d097b8ed915 (patch)
treec8ffe7ef1a32cb76397f15267a62bb694a84f2c5 /flake.nix
downloadwebsite-0147e08d3d8bb364207666225d758d097b8ed915.tar.gz
website-0147e08d3d8bb364207666225d758d097b8ed915.zip
init
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..09e48c6
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,49 @@
+{
+  description = "Hauntingly cool website";
+
+  inputs.nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
+
+  outputs =
+    { nixpkgs, ... }:
+    let
+      system = "x86_64-linux";
+      pkgs = import nixpkgs { inherit system; };
+    in
+    {
+      packages.${system}.default = pkgs.stdenv.mkDerivation {
+        pname = "website";
+        version = "0.1.0";
+
+        src = ./.;
+
+        nativeBuildInputs = [
+          pkgs.guile
+          pkgs.haunt
+        ];
+
+        buildPhase = ''
+          haunt build
+        '';
+
+        installPhase = ''
+          runHook preInstall
+
+          mkdir -p $out
+          cp -r site/* $out/
+
+          runHook postInstall
+        '';
+      };
+
+      devShells.${system}.default = pkgs.mkShell {
+        buildInputs = [
+          pkgs.guile
+          pkgs.haunt
+          pkgs.guile-commonmark
+        ];
+        shellHook = ''
+          echo "Entered Haunt dev shell. Run: haunt build/serve"
+        '';
+      };
+    };
+}