From a13add9b81df9cd43a1e6685eabd894ae34decf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sun, 29 Mar 2026 17:10:57 +0200 Subject: [PATCH] refactor modules --- .../themes/layan/_derivation.nix | 0 .../{ => desktop}/themes/layan/layan-qt6.nix | 0 modules/{ => desktop}/themes/layan/layan.nix | 0 modules/docs.nix | 32 +++++++++++++++++++ modules/services/borg-server.nix | 1 + modules/{programs => shell}/ranger.nix | 0 .../omz_custom/themes/my_bureau.zsh-theme | 0 modules/{ => shell}/zsh/zsh.nix | 0 .../{packages => tools}/bulk-transcode/.envrc | 0 .../bulk-transcode/_derivation.nix | 0 .../bulk-transcode/_shell.nix | 0 .../bulk-transcode/bulk-transcode.sh | 0 .../bulk-transcode/default.nix | 0 .../crossover/_derivation.nix | 0 .../{packages => tools}/crossover/default.nix | 0 modules/{programs => tools}/jj.nix | 0 modules/{bin => tools}/nix-scripts.nix | 0 .../spotify-shortcuts/.envrc | 0 .../spotify-shortcuts/_derivation.nix | 0 .../spotify-shortcuts/_shell.nix | 0 .../spotify-shortcuts/default.nix | 0 .../spotify-shortcuts/setup.py | 0 .../spotify_shortcuts/__init__.py | 0 .../spotify_shortcuts/__main__.py | 0 .../spotify_shortcuts/config.py | 0 .../spotify_shortcuts/registry.py | 0 .../spotify_shortcuts/run.py | 0 .../spotify_shortcuts/shortcut.py | 0 .../spotify_shortcuts/spotify_auth.py | 0 .../spotify_shortcuts/spotify_like.py | 0 .../spotify_shortcuts/spotify_pl_add.py | 0 31 files changed, 33 insertions(+) rename modules/{ => desktop}/themes/layan/_derivation.nix (100%) rename modules/{ => desktop}/themes/layan/layan-qt6.nix (100%) rename modules/{ => desktop}/themes/layan/layan.nix (100%) create mode 100644 modules/docs.nix rename modules/{programs => shell}/ranger.nix (100%) rename modules/{ => shell}/zsh/static/omz_custom/themes/my_bureau.zsh-theme (100%) rename modules/{ => shell}/zsh/zsh.nix (100%) rename modules/{packages => tools}/bulk-transcode/.envrc (100%) rename modules/{packages => tools}/bulk-transcode/_derivation.nix (100%) rename modules/{packages => tools}/bulk-transcode/_shell.nix (100%) rename modules/{packages => tools}/bulk-transcode/bulk-transcode.sh (100%) rename modules/{packages => tools}/bulk-transcode/default.nix (100%) rename modules/{packages => tools}/crossover/_derivation.nix (100%) rename modules/{packages => tools}/crossover/default.nix (100%) rename modules/{programs => tools}/jj.nix (100%) rename modules/{bin => tools}/nix-scripts.nix (100%) rename modules/{packages => tools}/spotify-shortcuts/.envrc (100%) rename modules/{packages => tools}/spotify-shortcuts/_derivation.nix (100%) rename modules/{packages => tools}/spotify-shortcuts/_shell.nix (100%) rename modules/{packages => tools}/spotify-shortcuts/default.nix (100%) rename modules/{packages => tools}/spotify-shortcuts/setup.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/__init__.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/__main__.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/config.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/registry.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/run.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/shortcut.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/spotify_auth.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/spotify_like.py (100%) rename modules/{packages => tools}/spotify-shortcuts/spotify_shortcuts/spotify_pl_add.py (100%) diff --git a/modules/themes/layan/_derivation.nix b/modules/desktop/themes/layan/_derivation.nix similarity index 100% rename from modules/themes/layan/_derivation.nix rename to modules/desktop/themes/layan/_derivation.nix diff --git a/modules/themes/layan/layan-qt6.nix b/modules/desktop/themes/layan/layan-qt6.nix similarity index 100% rename from modules/themes/layan/layan-qt6.nix rename to modules/desktop/themes/layan/layan-qt6.nix diff --git a/modules/themes/layan/layan.nix b/modules/desktop/themes/layan/layan.nix similarity index 100% rename from modules/themes/layan/layan.nix rename to modules/desktop/themes/layan/layan.nix diff --git a/modules/docs.nix b/modules/docs.nix new file mode 100644 index 0000000..a9b21e9 --- /dev/null +++ b/modules/docs.nix @@ -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 + ''; + }; + }; +} diff --git a/modules/services/borg-server.nix b/modules/services/borg-server.nix index 93ce12c..23b1a86 100644 --- a/modules/services/borg-server.nix +++ b/modules/services/borg-server.nix @@ -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 { diff --git a/modules/programs/ranger.nix b/modules/shell/ranger.nix similarity index 100% rename from modules/programs/ranger.nix rename to modules/shell/ranger.nix diff --git a/modules/zsh/static/omz_custom/themes/my_bureau.zsh-theme b/modules/shell/zsh/static/omz_custom/themes/my_bureau.zsh-theme similarity index 100% rename from modules/zsh/static/omz_custom/themes/my_bureau.zsh-theme rename to modules/shell/zsh/static/omz_custom/themes/my_bureau.zsh-theme diff --git a/modules/zsh/zsh.nix b/modules/shell/zsh/zsh.nix similarity index 100% rename from modules/zsh/zsh.nix rename to modules/shell/zsh/zsh.nix diff --git a/modules/packages/bulk-transcode/.envrc b/modules/tools/bulk-transcode/.envrc similarity index 100% rename from modules/packages/bulk-transcode/.envrc rename to modules/tools/bulk-transcode/.envrc diff --git a/modules/packages/bulk-transcode/_derivation.nix b/modules/tools/bulk-transcode/_derivation.nix similarity index 100% rename from modules/packages/bulk-transcode/_derivation.nix rename to modules/tools/bulk-transcode/_derivation.nix diff --git a/modules/packages/bulk-transcode/_shell.nix b/modules/tools/bulk-transcode/_shell.nix similarity index 100% rename from modules/packages/bulk-transcode/_shell.nix rename to modules/tools/bulk-transcode/_shell.nix diff --git a/modules/packages/bulk-transcode/bulk-transcode.sh b/modules/tools/bulk-transcode/bulk-transcode.sh similarity index 100% rename from modules/packages/bulk-transcode/bulk-transcode.sh rename to modules/tools/bulk-transcode/bulk-transcode.sh diff --git a/modules/packages/bulk-transcode/default.nix b/modules/tools/bulk-transcode/default.nix similarity index 100% rename from modules/packages/bulk-transcode/default.nix rename to modules/tools/bulk-transcode/default.nix diff --git a/modules/packages/crossover/_derivation.nix b/modules/tools/crossover/_derivation.nix similarity index 100% rename from modules/packages/crossover/_derivation.nix rename to modules/tools/crossover/_derivation.nix diff --git a/modules/packages/crossover/default.nix b/modules/tools/crossover/default.nix similarity index 100% rename from modules/packages/crossover/default.nix rename to modules/tools/crossover/default.nix diff --git a/modules/programs/jj.nix b/modules/tools/jj.nix similarity index 100% rename from modules/programs/jj.nix rename to modules/tools/jj.nix diff --git a/modules/bin/nix-scripts.nix b/modules/tools/nix-scripts.nix similarity index 100% rename from modules/bin/nix-scripts.nix rename to modules/tools/nix-scripts.nix diff --git a/modules/packages/spotify-shortcuts/.envrc b/modules/tools/spotify-shortcuts/.envrc similarity index 100% rename from modules/packages/spotify-shortcuts/.envrc rename to modules/tools/spotify-shortcuts/.envrc diff --git a/modules/packages/spotify-shortcuts/_derivation.nix b/modules/tools/spotify-shortcuts/_derivation.nix similarity index 100% rename from modules/packages/spotify-shortcuts/_derivation.nix rename to modules/tools/spotify-shortcuts/_derivation.nix diff --git a/modules/packages/spotify-shortcuts/_shell.nix b/modules/tools/spotify-shortcuts/_shell.nix similarity index 100% rename from modules/packages/spotify-shortcuts/_shell.nix rename to modules/tools/spotify-shortcuts/_shell.nix diff --git a/modules/packages/spotify-shortcuts/default.nix b/modules/tools/spotify-shortcuts/default.nix similarity index 100% rename from modules/packages/spotify-shortcuts/default.nix rename to modules/tools/spotify-shortcuts/default.nix diff --git a/modules/packages/spotify-shortcuts/setup.py b/modules/tools/spotify-shortcuts/setup.py similarity index 100% rename from modules/packages/spotify-shortcuts/setup.py rename to modules/tools/spotify-shortcuts/setup.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/__init__.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/__init__.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/__init__.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/__init__.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/__main__.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/__main__.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/__main__.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/__main__.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/config.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/config.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/config.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/config.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/registry.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/registry.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/registry.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/registry.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/run.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/run.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/run.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/run.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/shortcut.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/shortcut.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/shortcut.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/shortcut.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/spotify_auth.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/spotify_auth.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/spotify_auth.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/spotify_auth.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/spotify_like.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/spotify_like.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/spotify_like.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/spotify_like.py diff --git a/modules/packages/spotify-shortcuts/spotify_shortcuts/spotify_pl_add.py b/modules/tools/spotify-shortcuts/spotify_shortcuts/spotify_pl_add.py similarity index 100% rename from modules/packages/spotify-shortcuts/spotify_shortcuts/spotify_pl_add.py rename to modules/tools/spotify-shortcuts/spotify_shortcuts/spotify_pl_add.py