lpk-website

Lillehammer pistolklubb website
git clone https://git.echoz.io/lpk-website.git
Log | Files | Refs | README | LICENSE

commit 435ef57811eec6a2bcce4440a454f8114922e272
parent 955ca08e65cc33af8b521b360eff35b957400471
Author: Chris <chris@echoz.io>
Date:   Fri,  8 May 2026 16:42:16 +0200

chore: fetch theme with flake in favor of submodule

Diffstat:
D.gitmodules | 3---
Mflake.lock | 19++++++++++++++++++-
Mflake.nix | 19+++++++++++++++----
Dthemes/papermod | 1-
4 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "themes/papermod"] - path = themes/papermod - url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/flake.lock b/flake.lock @@ -15,9 +15,26 @@ "type": "indirect" } }, + "papermod": { + "flake": false, + "locked": { + "lastModified": 1777819582, + "narHash": "sha256-jx35q7y+GnBxK07sQHnAHehhSXdf/CcdBu6WTqCnZPU=", + "owner": "adityatelange", + "repo": "hugo-PaperMod", + "rev": "c4ca7ca486ecd67c8f6bba31551a6ee0d1455926", + "type": "github" + }, + "original": { + "owner": "adityatelange", + "repo": "hugo-PaperMod", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "papermod": "papermod" } } }, diff --git a/flake.nix b/flake.nix @@ -1,9 +1,12 @@ { inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; - inputs.self.submodules = true; + inputs.papermod = { + url = "github:adityatelange/hugo-PaperMod"; + flake = false; + }; outputs = - { nixpkgs, ... }: + { nixpkgs, papermod, ... }: let lib = nixpkgs.lib; systems = [ @@ -14,17 +17,24 @@ ]; argsFor = system: { pkgs = nixpkgs.legacyPackages.${system}; + themesDir = nixpkgs.legacyPackages.${system}.linkFarm "hugo-themes" [ + { + name = "papermod"; + path = papermod; + } + ]; }; forAllSystems = f: lib.genAttrs systems (system: f (argsFor system)); in { packages = forAllSystems ( - { pkgs, ... }: + { pkgs, themesDir, ... }: { default = pkgs.stdenv.mkDerivation { name = "lpk-website"; src = ./.; nativeBuildInputs = [ pkgs.hugo ]; + HUGO_THEMESDIR = themesDir; buildPhase = '' runHook preBuild hugo --minify --gc --destination $out @@ -36,9 +46,10 @@ ); devShells = forAllSystems ( - { pkgs, ... }: + { pkgs, themesDir, ... }: { default = pkgs.mkShell { + HUGO_THEMESDIR = themesDir; packages = with pkgs; [ hugo (pkgs.writeShellScriptBin "dev" '' diff --git a/themes/papermod b/themes/papermod @@ -1 +0,0 @@ -Subproject commit c4ca7ca486ecd67c8f6bba31551a6ee0d1455926