Remove clanModules

- Removes clanModules in favor of the new clanServices
- Adds a warning and link to the migration guide
This commit is contained in:
pinpox
2025-07-04 15:54:44 +02:00
parent e4949755d7
commit 35e5f4a42a
141 changed files with 83 additions and 5332 deletions

View File

@@ -1,7 +1,6 @@
{
lib,
config,
clan-core,
...
}:
let
@@ -41,9 +40,7 @@ let
};
in
{
imports = [
clan-core.clanModules.disk-id
];
imports = [ ];
config = {
boot.loader.systemd-boot.enable = true;

View File

@@ -1,7 +1,6 @@
{
lib,
config,
clan-core,
...
}:
let
@@ -41,9 +40,7 @@ let
};
in
{
imports = [
clan-core.clanModules.disk-id
];
imports = [ ];
config = {
boot.loader.systemd-boot.enable = true;

View File

@@ -129,50 +129,6 @@ nav:
- reference/cli/templates.md
- reference/cli/vars.md
- reference/cli/vms.md
- Modules (deprecated):
- Overview: reference/clanModules/index.md
- reference/clanModules/frontmatter/index.md
# TODO: display the docs of the clan.service modules
- reference/clanModules/admin.md
# This is the module overview and should stay at the top
- reference/clanModules/borgbackup-static.md
- reference/clanModules/data-mesher.md
- reference/clanModules/borgbackup.md
- reference/clanModules/deltachat.md
- reference/clanModules/disk-id.md
- reference/clanModules/dyndns.md
- reference/clanModules/ergochat.md
- reference/clanModules/garage.md
- reference/clanModules/heisenbridge.md
- reference/clanModules/importer.md
- reference/clanModules/iwd.md
- reference/clanServices/localbackup.md
- reference/clanModules/localbackup.md
- reference/clanModules/localsend.md
- reference/clanModules/matrix-synapse.md
- reference/clanModules/moonlight.md
- reference/clanModules/mumble.md
- reference/clanModules/mycelium.md
- reference/clanModules/nginx.md
- reference/clanModules/packages.md
- reference/clanModules/postgresql.md
- reference/clanModules/root-password.md
- reference/clanModules/single-disk.md
- reference/clanModules/sshd.md
- reference/clanModules/state-version.md
- reference/clanModules/static-hosts.md
- reference/clanModules/sunshine.md
- reference/clanModules/syncthing-static-peers.md
- reference/clanModules/syncthing.md
- reference/clanModules/thelounge.md
- reference/clanModules/trusted-nix-caches.md
- reference/clanModules/user-password.md
- reference/clanModules/auto-upgrade.md
- reference/clanModules/vaultwarden.md
- reference/clanModules/xfce.md
- reference/clanModules/zerotier-static-peers.md
- reference/clanModules/zerotier.md
- reference/clanModules/zt-tcp-relay.md
- clan.core (NixOS Options):
- Overview: reference/clan.core/index.md

View File

@@ -36,9 +36,6 @@
in
docs.optionsJSON;
# Options available via ` imports = [ clanModules.${moduleName} ]; ` (Direct nix import)
clanModulesViaNix = pkgs.writeText "info.json" (builtins.toJSON jsonDocs.clanModulesViaNix);
# Options available when imported via ` inventory.${moduleName}....${rolesName} `
clanModulesViaRoles = pkgs.writeText "info.json" (builtins.toJSON jsonDocs.clanModulesViaRoles);
@@ -94,7 +91,6 @@
# A file that contains the links to all clanModule docs
export CLAN_MODULES_VIA_ROLES=${clanModulesViaRoles}
export CLAN_MODULES_VIA_SERVICE=${clanModulesViaService}
export CLAN_MODULES_VIA_NIX=${clanModulesViaNix}
export CLAN_SERVICE_INTERFACE=${self'.legacyPackages.clan-service-module-interface}/share/doc/nixos/options.json
# Frontmatter format for clanModules
export CLAN_MODULES_FRONTMATTER_DOCS=${clanModulesFrontmatter}/share/doc/nixos/options.json
@@ -111,7 +107,6 @@
legacyPackages = {
inherit
jsonDocs
clanModulesViaNix
clanModulesViaRoles
clanModulesViaService
;

View File

@@ -1,34 +1,17 @@
{
modulesRolesOptions,
nixosOptionsDoc,
clanModules,
evalClanModules,
lib,
pkgs,
clan-core,
...
}:
let
inherit (clan-core.clanLib.docs) stripStorePathsFromDeclarations;
transformOptions = stripStorePathsFromDeclarations;
in
{
# clanModules docs
clanModulesViaNix = lib.mapAttrs (
name: module:
if builtins.pathExists (module + "/default.nix") then
(nixosOptionsDoc {
options =
((evalClanModules {
modules = [ module ];
inherit pkgs clan-core;
}).options
).clan.${name} or { };
warningsAreErrors = true;
inherit transformOptions;
}).optionsJSON
else
{ }
) clanModules;
clanModulesViaRoles = lib.mapAttrs (
_moduleName: rolesOptions:

View File

@@ -864,7 +864,7 @@ if __name__ == "__main__": #
produce_clan_service_author_docs()
produce_clan_modules_docs()
# produce_clan_modules_docs()
produce_clan_service_docs()
produce_clan_modules_frontmatter_docs()
# produce_clan_modules_frontmatter_docs()

View File

@@ -23,7 +23,7 @@ The following tutorial will walk through setting up a Backup service where the t
The inventory defines `services`. Membership of `machines` is defined via `roles` exclusively.
See each [modules documentation](../reference/clanModules/index.md) for its available roles.
See each [modules documentation](../reference/clanServices/index.md) for its available roles.
### Adding services to machines