packages/landing: base configuration

This commit is contained in:
Max Headroom 2022-07-31 16:40:33 +02:00
parent 51e6d79977
commit cff89b6864
4 changed files with 40 additions and 4 deletions

View file

@ -1 +1,2 @@
source ../../build-support/activate-shell source ../../build-support/activate-shell
nix_direnv_watch_file project.nix

12
packages/websites/landing/.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
# hugo generated files
public/
resources/_gen/
assets/jsconfig.json
.hugo_build.lock
hugo_stats.json
# nix config only
/config.toml
/config.yaml
/config.yml
/config.json

View file

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

View file

@ -1,9 +1,26 @@
{ pkgs, ... }: { lib, pkgs, self', ... }:
let
theme = self'.packages.gohugo-theme-ananke;
themeName = "ananke";
themesDir = "${theme}/share/hugo/themes";
configFile = pkgs.writeText "hugo-config.json" (builtins.toJSON {
title = "Private Void | Zero-maintenance perfection";
baseURL = "https://www.privatevoid.net/";
languageCode = "en-us";
theme = themeName;
inherit themesDir;
});
hugoArgs = [
"--config" configFile
];
in
{ {
projectShells.landing = { projectShells.landing = {
tools = with pkgs; [ commands.hugo = {
hugo help = pkgs.hugo.meta.description;
]; command = "exec ${pkgs.hugo}/bin/hugo ${lib.concatStringsSep " " hugoArgs} \"$@\"";
};
}; };
} }