refactor modules

This commit is contained in:
2026-03-29 17:10:57 +02:00
parent 0b0dd1a1ba
commit a13add9b81
31 changed files with 33 additions and 0 deletions

32
modules/docs.nix Normal file
View File

@@ -0,0 +1,32 @@
{
self,
inputs,
...
}: {
perSystem = {
pkgs,
lib,
system,
...
}: {
packages.docs = let
nixos = inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules =
[
inputs.sops-nix.nixosModules.sops
]
++ lib.attrValues self.nixosModules;
};
doc = pkgs.nixosOptionsDoc {options.hive = nixos.options.hive;};
in
pkgs.stdenvNoCC.mkDerivation {
name = ".hive-docs";
buildCommand = ''
mkdir -p $out
cp ${doc.optionsCommonMark} $out/docs.md
${pkgs.pandoc}/bin/pandoc -o $out/docs.html $out/docs.md
'';
};
};
}

View File

@@ -28,6 +28,7 @@
description = "The user for the borg repository home.";
};
repositories = lib.mkOption {
description = "The borg repositories to serve";
type = lib.types.attrsOf (lib.types.submodule {
options = {
name = lib.mkOption {