initial project setup

This commit is contained in:
Vinzenz Schroeter 2025-04-06 12:53:20 +02:00
commit def7b1a01f
14 changed files with 150 additions and 0 deletions

9
.gitignore vendored Normal file
View file

@ -0,0 +1,9 @@
.direnv
# build artifacts
/result
/public
_gen
# downloaded by nix
themes/hugo-theme-m10c

0
.hugo_build.lock Normal file
View file

5
archetypes/default.md Normal file
View file

@ -0,0 +1,5 @@
+++
date = '{{ .Date }}'
draft = true
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
+++

0
assets/.gitkeep Normal file
View file

1
content/index.md Normal file
View file

@ -0,0 +1 @@
this is index.md

View file

@ -0,0 +1,7 @@
+++
date = '2025-04-06T12:24:08+02:00'
draft = true
title = 'Hello World'
+++
# this is a test

0
data/.gitkeep Normal file
View file

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1743703532,
"narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bdb91860de2f719b57eef819b5617762f7120c70",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

97
flake.nix Normal file
View file

@ -0,0 +1,97 @@
{
description = "Flake for the contents of https://zerforschen.plus";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
};
outputs =
{ self, nixpkgs }:
let
supported-systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems =
f:
nixpkgs.lib.genAttrs supported-systems (
system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
inherit system;
}
);
in
{
packages = forAllSystems (
{ pkgs, ... }:
rec {
hugo-theme-m10c = pkgs.stdenv.mkDerivation {
pname = "hugo-theme-m10c";
homepage = "https://themes.gohugo.io/themes/hugo-theme-m10c/";
version = "";
src = pkgs.fetchFromGitHub {
owner = "vaga";
repo = "hugo-theme-m10c";
rev = "862c6e941be9bc46ce8adc6a2fa9e984ba647d6f";
hash = "sha256-wcJSGjL/u43hPLblPmUhusqiMmadVBWJhihRinRXqzg=";
};
installPhase = ''
mkdir -p $out
cp -r * $out
'';
};
zerforschen-plus-content = pkgs.stdenv.mkDerivation {
name = "zerforschen-plus-content";
# Source directory containing your Hugo project
src = ./.;
# Build dependencies
nativeBuildInputs = [
pkgs.hugo
];
preBuildPhase = ''
'';
# Build phase - run Hugo to generate the site
buildPhase = ''
# Copy in theme before building website
mkdir -p themes/hugo-theme-m10c
cp -r ${hugo-theme-m10c}/* themes/hugo-theme-m10c/
hugo
'';
# Install phase - copy the public directory to the output
installPhase = ''
mkdir -p $out
cp -r public/* $out/
'';
};
default = zerforschen-plus-content;
}
);
devShells = forAllSystems (
{ pkgs, system, ... }:
{
default = pkgs.mkShellNoCC rec {
inputsFrom = [ self.packages.${system}.default ];
shellHook = ''
mkdir -p themes
ln -snf "${self.packages.${system}.hugo-theme-m10c}" themes/hugo-theme-m10c
'';
};
}
);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}

4
hugo.toml Normal file
View file

@ -0,0 +1,4 @@
baseURL = 'https://zerforschen.plus'
languageCode = 'en-us'
title = 'zerforschen+'
theme = 'hugo-theme-m10c'

0
i18n/.gitkeep Normal file
View file

0
layouts/.gitkeep Normal file
View file

0
static/.gitkeep Normal file
View file

0
themes/.gitkeep Normal file
View file