diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e33e0e4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1749143949, + "narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d3d2d80a2191a73d1e86456a751b83aa13085d7d", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ed96b63 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + }; + outputs = {nixpkgs, ...}: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.${system} = { + default = pkgs.callPackage ./package.nix {}; + }; + devShells.${system} = { + default = pkgs.mkShell { + nativeBuildInputs = [ + pkgs.zola + pkgs.tokei + ]; + shellHook = '' + ${pkgs.cowsay}/bin/cowsay Welcome to the devshell + ''; + }; + }; + }; +} diff --git a/package.nix b/package.nix new file mode 100644 index 0000000..40ac872 --- /dev/null +++ b/package.nix @@ -0,0 +1,30 @@ +{ + zola, + lib, + stdenv, + ... +}: +stdenv.mkDerivation { + pname = "elmskell-blog"; + version = "0.1.0"; + src = ./.; + nativeBuildInputs = [ + zola + ]; + configurePhase = '' + zola check + ''; + buildPhase = '' + zola build + ''; + installPhase = '' + mkdir -p $out/wwwroot + cp ./public/* $out/wwwroot/ -r + ''; + meta = { + description = "Andromeda's blog, statically served via Zola"; + longDescription = "Andromeda's blog, statically served via Zola"; + homepage = "https://mtgmonkey.net"; + license = lib.licenses.wtfpl; + }; +} diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..f8414f0 --- /dev/null +++ b/public/404.html @@ -0,0 +1,3 @@ + +
+ You're seeing this page because we couldn't find a template to render. +
+
+ To modify this page, create a index.html file in the templates directory or
+ install a theme.
+
+ You can find what variables are available in this template in the documentation.
+