Build docs with nix and Material for mkDocs / build-docs (push) Successful in 1m33s
82 lines
3.8 KiB
Nix
82 lines
3.8 KiB
Nix
{ inputs, self, ... }: let
|
|
mkSharedGraphicsOptions = { pkgs, lib }: {
|
|
components = {
|
|
windowManagers = lib.mkOption {
|
|
type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/window-managers");
|
|
description = "This option defines the window manager(s) that should be installed, enabling any config associated with it in the process. It can be either a list or just one value.";
|
|
default = [];
|
|
};
|
|
|
|
shells = lib.mkOption {
|
|
type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/shells");
|
|
description = "This option defines the graphical shell(s) that should be installed (e.g. Noctalia, DMS), enabling any config associated with it in the process. It can be either a list or just one value.";
|
|
default = [];
|
|
};
|
|
};
|
|
|
|
features = {
|
|
applications.gui = {
|
|
equibop = {
|
|
enable = lib.mkEnableOption "equibop";
|
|
autostart = lib.mkOption {
|
|
type = lib.types.bool;
|
|
description = "This option controls whether an `equibop.desktop` file is generated and placed into `$XDG_CONFIG_HOME/autostart`.";
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
floorp.enable = lib.mkEnableOption "floorp";
|
|
|
|
fluxer.enable = lib.mkEnableOption "fluxer";
|
|
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
|
|
|
|
kitty.enable = lib.mkEnableOption "kitty";
|
|
|
|
nautilus.enable = lib.mkEnableOption "nautilus";
|
|
|
|
remmina.enable = lib.mkEnableOption "remmina";
|
|
|
|
spotify = {
|
|
enable = lib.mkEnableOption "spotify";
|
|
spicetify = {
|
|
enable = lib.mkEnableOption "spicetify";
|
|
theme = lib.mkOption {
|
|
type = lib.types.nullOr (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;
|
|
};
|
|
};
|
|
};
|
|
|
|
vscode.enable = lib.mkEnableOption "vscode";
|
|
};
|
|
|
|
nixos.stylix.enable = lib.mkEnableOption "stylix";
|
|
};
|
|
};
|
|
|
|
redundantOptionWarn = name: value: "The functionality of this option completely depends on `${name}` being `${value}`, and will not be evaluated otherwise.";
|
|
in {
|
|
flake.nixosModules.graphicsOptions = { pkgs, lib, ... }: {
|
|
options = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }) // {
|
|
components = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).components // {
|
|
displayManager = lib.mkOption {
|
|
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/display-managers";
|
|
description = "This option defines the bootloader that should be used, enabling any config associated with it in the process.";
|
|
default = "lightdm";
|
|
};
|
|
};
|
|
|
|
features = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features // {
|
|
applications.gui = {
|
|
equibop.enable.description = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features.applications.gui.equibop.enable.description + "\n" + (redundantOptionWarn "features.nixos.home-manager.enable" "true");
|
|
spotify.spicetify.theme.description = (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features.applications.gui.spotify.spicetify.theme.description + "\n" + (redundantOptionWarn "features.nixos.home-manager.enable" "true");
|
|
} // (mkSharedGraphicsOptions { inherit pkgs; inherit lib; }).features.applications.gui;
|
|
};
|
|
};
|
|
};
|
|
|
|
flake.homeModules.graphicsOptions = { pkgs, lib, ... }: {
|
|
options = mkSharedGraphicsOptions { inherit pkgs; inherit lib; };
|
|
};
|
|
} |