move options back out to their config files, improve documentation

This commit is contained in:
greyweather committed 2026-09-02 00:05:28 +01:00
1 parent 70ac7954ad
commit 9c13923c2e
30 files changed
+344 -233

No files matched your search

+31 -1
View File
@@ -1,4 +1,27 @@
{ inputs, self, ... }: {
{ inputs, self, ... }: let
spicetifyEnableOptionAttrs = { lib }: {
type = lib.types.bool;
description = "Whether to enable Spicetify, a modified version of Spotify that supports plugins and themes.";
default = false;
};
spicetifyThemeOptionAttrs = { pkgs, lib }: {
type = inputs.nixpkgs.lib.types.nullOr (inputs.nixpkgs.lib.types.enum (builtins.attrNames inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system}.themes));
description = "This option is used to select a theme for Spicetify to use, from the list of available packages themes.";
default = null;
};
in {
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
options.features.applications.gui.spotify.enable = lib.mkEnableOption "Spotify";
})) ];
flake.nixosModules.graphicsOptions = { lib, pkgs, ... }: {
options.features.applications.gui.spotify.spicetify = {
enable = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (spicetifyEnableOptionAttrs { inherit lib; });
theme = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (spicetifyThemeOptionAttrs { inherit pkgs lib; });
};
};
flake.nixosModules.graphics = { pkgs, config, lib, ... }: let
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
@@ -12,6 +35,13 @@
});
};
flake.homeModules.graphicsOptions = { lib, pkgs, ... }: {
options.features.applications.gui.spotify.spicetify = {
enable = lib.mkOption (spicetifyEnableOptionAttrs { inherit lib; });
theme = lib.mkOption (spicetifyThemeOptionAttrs { inherit pkgs lib; });
};
};
flake.homeModules.graphics = { pkgs, config, lib, ... }: let
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {