diff --git a/machines/nixos/compute01/extranix/default.nix b/machines/nixos/compute01/extranix/default.nix
index 32b30bb..7a843f0 100644
--- a/machines/nixos/compute01/extranix/default.nix
+++ b/machines/nixos/compute01/extranix/default.nix
@@ -4,6 +4,7 @@
{
lib,
+ pkgs,
meta,
bootstrap,
sources,
@@ -20,8 +21,18 @@ in
enableACME = true;
forceSSL = true;
};
+
extranix = {
enable = true;
+
+ theme = pkgs.fetchFromGitea {
+ domain = "git.dgnum.eu";
+ owner = "DGNum";
+ repo = "extranix-theme";
+ rev = "99e14ca818fb1f664a2221e1cc8394325426b446";
+ hash = "sha256-mDa03Y3Lf/piBzxTyiNj/8OI2rYEW5Pn99lXVL9EQmg=";
+ };
+
modules = {
"netconf" = {
paths = mkImports bootstrap.root [
@@ -95,6 +106,7 @@ in
languageCode = "en-us";
params = {
logo = "images/dgnum.png";
+ release_switch_title = "Category";
footer_credits_line = ''
Based on Home Manager Option Search
'';
@@ -103,7 +115,7 @@ in
'';
main_menu = [
{
- name = ''
Source'';
+ name = ''
Source'';
url = "https://git.dgnum.eu/DGNum/infrastructure/";
}
];
diff --git a/modules/nixos/extranix/default.nix b/modules/nixos/extranix/default.nix
index fd3cdba..9edbe23 100644
--- a/modules/nixos/extranix/default.nix
+++ b/modules/nixos/extranix/default.nix
@@ -52,13 +52,6 @@ let
str
;
- inherit (pkgs)
- fetchFromGitea
- hugo
- runCommand
- symlinkJoin
- ;
-
mkDocJSON =
module:
{
@@ -177,22 +170,16 @@ let
'';
website =
- runCommand "search-infra"
+ pkgs.runCommand "search-infra"
{
- theme = fetchFromGitea {
- domain = "git.dgnum.eu";
- owner = "DGNum";
- repo = "options-search-theme";
- rev = "bcdc3e724ad5478ed39ce62a6e3342130a1bcabd";
- hash = "sha256-pg0NifmHdfK4OltSOQfYgTVa7juZlGF642Q4Du3uheY=";
- };
+ inherit (cfg) theme;
- nativeBuildInputs = [ hugo ];
+ nativeBuildInputs = [ pkgs.hugo ];
config = builtins.toJSON cfg.settings;
passAsFile = [ "config" ];
- data = symlinkJoin {
+ data = pkgs.symlinkJoin {
name = "options-data";
paths = mapAttrsToList mkDocJSON cfg.modules;
};
@@ -216,6 +203,13 @@ in
options.services.extranix = {
enable = mkEnableOption "extranix documentation";
+ theme = mkOption {
+ type = path;
+ description = ''
+ Path to a hugo theme for the search website.
+ '';
+ };
+
modules = mkOption {
type = attrsOf (submodule {
options = {