infrastructure/machines/nixos/compute01/extranix/default.nix
Tom Hubrecht 6d81001b85
All checks were successful
Build all the nodes / geo02 (push) Successful in 59s
Build all the nodes / geo01 (push) Successful in 1m0s
Build all the nodes / hypervisor02 (push) Successful in 1m0s
Build all the nodes / hypervisor01 (push) Successful in 1m0s
Build all the nodes / netaccess01 (push) Successful in 19s
Build all the nodes / netcore00 (push) Successful in 19s
Build all the nodes / netcore02 (push) Successful in 20s
Build all the nodes / netcore01 (push) Successful in 20s
Build all the nodes / ap01 (push) Successful in 1m24s
Build all the nodes / bridge01 (push) Successful in 2m5s
Build all the nodes / build01 (push) Successful in 2m5s
Build all the nodes / hypervisor03 (push) Successful in 2m5s
Build all the nodes / cof02 (push) Successful in 2m12s
Build all the nodes / storage01 (push) Successful in 58s
Build all the nodes / tower01 (push) Successful in 56s
Build all the nodes / rescue01 (push) Successful in 1m0s
Build the shell / build-shell (push) Successful in 44s
Run pre-commit on all files / pre-commit (push) Successful in 46s
Build all the nodes / compute01 (push) Successful in 3m10s
Build all the nodes / web01 (push) Successful in 2m3s
Build all the nodes / web02 (push) Successful in 1m29s
Build all the nodes / web03 (push) Successful in 1m35s
Build all the nodes / vault01 (push) Successful in 1m0s
feat(extranix): Add theme option and update
2025-04-17 12:58:44 +02:00

126 lines
3.5 KiB
Nix

# SPDX-FileCopyrightText: 2024 Lubin Bailly <lubin.bailly@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
lib,
pkgs,
meta,
bootstrap,
sources,
dgn-keys,
...
}:
let
inherit (lib.extra) mkImports;
host = "search.infra.dgnum.eu";
in
{
services = {
nginx.virtualHosts.${host} = {
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 [
"modules/netconf"
"modules/generic"
"lib/netconf-junos"
];
path-translations = [
{
base = bootstrap.root;
url = "https://git.dgnum.eu/DGNum/infrastructure/src/branch/main/";
}
];
};
"DGNum Infrastructure" =
let
# prefer a non-patched nixpkgs
infra-nixpkgs = bootstrap.pkgs;
infra-modulesPath = "${infra-nixpkgs.path}/nixos/modules/";
in
{
paths = mkImports bootstrap.root [
"modules/generic"
"modules/nixos"
];
ignored-modules = (import "${infra-modulesPath}/module-list.nix") ++ [
"${sources.agenix}/modules/age.nix"
"${sources.arkheon}/module.nix"
"${sources."microvm.nix"}/nixos-modules/host"
"${sources.cgroup-exporter}/nix/module.nix"
{ system.stateVersion = "25.05"; }
];
specialArgs = {
inherit meta sources;
modulesPath = builtins.storePath infra-modulesPath;
pkgs = infra-nixpkgs;
inherit (infra-nixpkgs) lib;
name = "nodeName";
nodeMeta = {
nix-modules = [ ];
admins = [ ];
adminGroups = [ ];
};
dgn-keys = dgn-keys // {
getNodeAdmins = _: [ ];
};
};
path-translations = [
{
base = bootstrap.root;
url = "https://git.dgnum.eu/DGNum/infrastructure/src/branch/main/";
}
{
base = sources.nix-modules;
url = "https://git.hubrecht.ovh/hubrecht/nix-modules/src/branch/main/";
}
{
base = infra-modulesPath;
url = "https://github.com/NixOS/nixpkgs/tree/master/nixos/modules";
}
];
};
};
inherit host;
index = "DGNum Infrastructure";
settings = {
baseUrl = "https://dgnum.eu/";
title = "DGNum module documentation";
languageCode = "en-us";
params = {
logo = "images/dgnum.png";
release_switch_title = "Category";
footer_credits_line = ''
Based on <a href="https://github.com/mipmip/home-manager-option-search">Home Manager Option Search</a>
'';
footer_copyright_line = ''
Made by catvayor for the <a href="https://dgnum.eu">DGNum</a>.
'';
main_menu = [
{
name = ''<img src="images/forgejo.png" /> Source'';
url = "https://git.dgnum.eu/DGNum/infrastructure/";
}
];
};
};
};
};
}