diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 705fe6a..8c818ab 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: DeterminateSystems/nix-installer-action@main - uses: actions/checkout@v4 - - run: nix build + - run: nix-build - uses: actions/upload-pages-artifact@v3 with: path: result/ diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..56732a3 --- /dev/null +++ b/default.nix @@ -0,0 +1,20 @@ +{ + system ? builtins.currentSystem, + pkgs ? import (builtins.fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/56c0d09b76608a7fa28127a37d81d9003e46acf6.tar.gz"; + }) { inherit system; }, + papermod ? pkgs.fetchFromGitHub { + owner = "adityatelange"; + repo = "hugo-papermod"; + rev = "master"; + hash = "sha256-Dv/QnYYG5KTQro95kzwgQeOS0nO2HyfBoSou5AsCFAI="; + }, +}: +pkgs.stdenv.mkDerivation { + name = "website"; + src = ./.; + postPatch = "mkdir themes && cp -r ${papermod} themes/papermod"; + nativeBuildInputs = [ pkgs.hugo ]; + buildPhase = "hugo"; + installPhase = "cp -r public $out"; +} diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 0617a52..0000000 --- a/flake.lock +++ /dev/null @@ -1,77 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1725867797, - "narHash": "sha256-DW6NHvXHrWFUa0TY4TCf+M8uFIRhmV9H3smBZ2Pu7pk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "cb97dfe6c051011be9cb13cd33103c907d9b2107", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "papermod": { - "flake": false, - "locked": { - "lastModified": 1723905772, - "narHash": "sha256-iKKAAR5ipeimIgC137tbpkWlwIzNDAcPPKNLwdhW1CI=", - "owner": "adityatelange", - "repo": "hugo-papermod", - "rev": "58c4841c26325eaa788d9b13e65d5dfc95d9367c", - "type": "github" - }, - "original": { - "owner": "adityatelange", - "repo": "hugo-papermod", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "papermod": "papermod" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index f21881a..0000000 --- a/flake.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; - papermod = { - url = "github:adityatelange/hugo-papermod"; - flake = false; - }; - }; - - outputs = - { - self, - nixpkgs, - flake-utils, - papermod, - }: - flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = import nixpkgs { inherit system; }; - website = pkgs.stdenv.mkDerivation { - name = "website"; - src = ./.; - postPatch = "mkdir themes && cp -r ${papermod} themes/papermod"; - nativeBuildInputs = [ pkgs.hugo ]; - buildPhase = "hugo"; - installPhase = "cp -r public $out"; - }; - in - { - packages.default = website; - devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; }; - } - ); -}