From c8da653bd15a1d7a2d01fdd808aaa89079d2bca0 Mon Sep 17 00:00:00 2001 From: InioX Date: Sat, 14 Oct 2023 18:59:12 +0200 Subject: [PATCH] feat(modules): switch `mkEnableOption` to `mkBoolOpt` --- modules/apps/firefox/default.nix | 6 ++++-- modules/apps/gmail/default.nix | 6 ++++-- modules/apps/prism-launcher/default.nix | 6 ++++-- modules/apps/vscodium/default.nix | 8 +++++--- modules/cli/bash/default.nix | 6 ++++-- modules/cli/git/default.nix | 6 ++++-- modules/cli/neofetch/default.nix | 6 ++++-- modules/cli/starship/default.nix | 6 ++++-- modules/cli/zsh/default.nix | 6 ++++-- modules/desktop/addons/ags/default.nix | 6 ++++-- modules/desktop/addons/alacritty/default.nix | 6 ++++-- modules/desktop/addons/dunst/default.nix | 6 ++++-- modules/desktop/addons/gtk/default.nix | 6 ++++-- modules/desktop/addons/kitty/default.nix | 6 ++++-- modules/desktop/addons/matugen/default.nix | 6 ++++-- modules/desktop/addons/rofi/default.nix | 6 ++++-- modules/desktop/addons/sddm/default.nix | 6 ++++-- modules/desktop/addons/waybar/default.nix | 6 ++++-- modules/desktop/awesome/default.nix | 6 ++++-- modules/desktop/hyprland/default.nix | 8 +++++--- modules/desktop/xfce/default.nix | 6 ++++-- 21 files changed, 86 insertions(+), 44 deletions(-) diff --git a/modules/apps/firefox/default.nix b/modules/apps/firefox/default.nix index ba20c70..42e5a38 100644 --- a/modules/apps/firefox/default.nix +++ b/modules/apps/firefox/default.nix @@ -2,13 +2,15 @@ config, pkgs, lib, + zenyte-lib, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.apps.firefox; in { options.zenyte.apps.firefox = with types; { - enable = mkEnableOption "Whether to enable firefox."; + enable = mkBoolOpt false "Whether to enable firefox."; extensions = mkOption { type = nullOr (listOf package); description = '' diff --git a/modules/apps/gmail/default.nix b/modules/apps/gmail/default.nix index 84385bd..73a498a 100644 --- a/modules/apps/gmail/default.nix +++ b/modules/apps/gmail/default.nix @@ -2,10 +2,12 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.apps.gmail; gmailIcon = let @@ -31,7 +33,7 @@ with lib; let }; in { options.zenyte.apps.gmail = { - enable = mkEnableOption "Whether to enable gmail as a desktop entry."; + enable = mkBoolOpt false "Whether to enable gmail as a desktop entry."; }; config = mkIf cfg.enable { diff --git a/modules/apps/prism-launcher/default.nix b/modules/apps/prism-launcher/default.nix index f304055..99fcfd3 100644 --- a/modules/apps/prism-launcher/default.nix +++ b/modules/apps/prism-launcher/default.nix @@ -2,16 +2,18 @@ config, pkgs, lib, + zenyte-lib, inputs, system, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.apps.prism-launcher; in { options.zenyte.apps.prism-launcher = with types; { - enable = mkEnableOption "Whether to enable Prism Launcher."; + enable = mkBoolOpt false "Whether to enable Prism Launcher."; extensions = mkOption { type = nullOr (listOf package); description = '' diff --git a/modules/apps/vscodium/default.nix b/modules/apps/vscodium/default.nix index f19a117..aec2b14 100644 --- a/modules/apps/vscodium/default.nix +++ b/modules/apps/vscodium/default.nix @@ -2,9 +2,11 @@ config, pkgs, lib, + zenyte-lib, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.apps.vscodium; # Modified code from https://github.com/nix-community/home-manager/issues/3507#issuecomment-1616803481 @@ -17,7 +19,7 @@ with lib; let ''; in { options.zenyte.apps.vscodium = with types; { - enable = mkEnableOption "Whether to enable vscodium."; + enable = mkBoolOpt false "Whether to enable vscodium."; extensions = mkOption { type = nullOr (listOf package); description = '' @@ -117,7 +119,7 @@ in { " cfg = config.zenyte.$1.$2;" " in {" " options.zenyte.$1.$2 = {" - " enable = mkEnableOption \"Whether to enable $2.\";" + " enable = mkBoolOpt false \"Whether to enable $2.\";" " };" "" " config = mkIf cfg.enable {" diff --git a/modules/cli/bash/default.nix b/modules/cli/bash/default.nix index 07143f9..3a59f5d 100644 --- a/modules/cli/bash/default.nix +++ b/modules/cli/bash/default.nix @@ -2,15 +2,17 @@ config, pkgs, lib, + zenyte-lib, inputs, username, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.cli.bash; in { options.zenyte.cli.bash = with types; { - enable = mkEnableOption "Whether to set bash as the default shell."; + enable = mkBoolOpt false "Whether to set bash as the default shell."; }; config = mkIf cfg.enable { zenyte.home.programs.bash = { diff --git a/modules/cli/git/default.nix b/modules/cli/git/default.nix index c99926c..9516551 100644 --- a/modules/cli/git/default.nix +++ b/modules/cli/git/default.nix @@ -2,15 +2,17 @@ config, pkgs, lib, + zenyte-lib, inputs, username, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.cli.git; in { options.zenyte.cli.git = with types; { - enable = mkEnableOption "Whether to enable git."; + enable = mkBoolOpt false "Whether to enable git."; email = mkOption { type = str; default = ""; diff --git a/modules/cli/neofetch/default.nix b/modules/cli/neofetch/default.nix index 1f2a94f..b7be6fe 100644 --- a/modules/cli/neofetch/default.nix +++ b/modules/cli/neofetch/default.nix @@ -2,15 +2,17 @@ config, pkgs, lib, + zenyte-lib, inputs, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.cli.neofetch; in { options.zenyte.cli.neofetch = with types; { - enable = mkEnableOption "Whether to enable neofetch."; + enable = mkBoolOpt false "Whether to enable neofetch."; }; config = mkIf cfg.enable { diff --git a/modules/cli/starship/default.nix b/modules/cli/starship/default.nix index 6066c60..e1a0a6f 100644 --- a/modules/cli/starship/default.nix +++ b/modules/cli/starship/default.nix @@ -2,15 +2,17 @@ config, pkgs, lib, + zenyte-lib, inputs, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.cli.starship; in { options.zenyte.cli.starship = with types; { - enable = mkEnableOption "Whether to enable starship."; + enable = mkBoolOpt false "Whether to enable starship."; }; config = mkIf cfg.enable { diff --git a/modules/cli/zsh/default.nix b/modules/cli/zsh/default.nix index eb34291..a499a18 100644 --- a/modules/cli/zsh/default.nix +++ b/modules/cli/zsh/default.nix @@ -2,15 +2,17 @@ config, pkgs, lib, + zenyte-lib, inputs, username, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.cli.zsh; in { options.zenyte.cli.zsh = with types; { - enable = mkEnableOption "Whether to set zsh as the default shell."; + enable = mkBoolOpt false "Whether to set zsh as the default shell."; }; config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ diff --git a/modules/desktop/addons/ags/default.nix b/modules/desktop/addons/ags/default.nix index 08cac11..531b3ce 100644 --- a/modules/desktop/addons/ags/default.nix +++ b/modules/desktop/addons/ags/default.nix @@ -2,16 +2,18 @@ config, pkgs, lib, + zenyte-lib, configFolder, system, inputs, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.ags; in { options.zenyte.desktop.addons.ags = { - enable = mkEnableOption "Whether to enable ags."; + enable = mkBoolOpt false "Whether to enable ags."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/alacritty/default.nix b/modules/desktop/addons/alacritty/default.nix index 0a0519a..35888e1 100644 --- a/modules/desktop/addons/alacritty/default.nix +++ b/modules/desktop/addons/alacritty/default.nix @@ -2,14 +2,16 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.alacritty; in { options.zenyte.desktop.addons.alacritty = { - enable = mkEnableOption "Whether to enable alacritty."; + enable = mkBoolOpt false "Whether to enable alacritty."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/dunst/default.nix b/modules/desktop/addons/dunst/default.nix index a70faf4..4eaee14 100644 --- a/modules/desktop/addons/dunst/default.nix +++ b/modules/desktop/addons/dunst/default.nix @@ -2,14 +2,16 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.dunst; in { options.zenyte.desktop.addons.dunst = { - enable = mkEnableOption "Whether to enable the k-vernooy dunst fork."; + enable = mkBoolOpt false "Whether to enable the k-vernooy dunst fork."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/gtk/default.nix b/modules/desktop/addons/gtk/default.nix index e150146..65f1c19 100644 --- a/modules/desktop/addons/gtk/default.nix +++ b/modules/desktop/addons/gtk/default.nix @@ -2,10 +2,12 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.gtk; schema = pkgs.gsettings-desktop-schemas; @@ -20,7 +22,7 @@ with lib; let ''; in { options.zenyte.desktop.addons.gtk = { - enable = mkEnableOption "Whether to enable gtk theme."; + enable = mkBoolOpt false "Whether to enable gtk theme."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/kitty/default.nix b/modules/desktop/addons/kitty/default.nix index 9f69994..54f4d8d 100644 --- a/modules/desktop/addons/kitty/default.nix +++ b/modules/desktop/addons/kitty/default.nix @@ -2,14 +2,16 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.kitty; in { options.zenyte.desktop.addons.kitty = { - enable = mkEnableOption "Whether to enable kitty."; + enable = mkBoolOpt false "Whether to enable kitty."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/matugen/default.nix b/modules/desktop/addons/matugen/default.nix index 7a96b18..eaed48b 100644 --- a/modules/desktop/addons/matugen/default.nix +++ b/modules/desktop/addons/matugen/default.nix @@ -2,16 +2,18 @@ config, pkgs, lib, + zenyte-lib, configFolder, templateFolder, username, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.matugen; in { options.zenyte.desktop.addons.matugen = { - enable = mkEnableOption "Whether to enable matugen."; + enable = mkBoolOpt false "Whether to enable matugen."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/rofi/default.nix b/modules/desktop/addons/rofi/default.nix index 3a8420c..907049a 100644 --- a/modules/desktop/addons/rofi/default.nix +++ b/modules/desktop/addons/rofi/default.nix @@ -2,14 +2,16 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.rofi; in { options.zenyte.desktop.addons.rofi = { - enable = mkEnableOption "Whether to enable rofi."; + enable = mkBoolOpt false "Whether to enable rofi."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/sddm/default.nix b/modules/desktop/addons/sddm/default.nix index cf8b1bc..38b4b0b 100644 --- a/modules/desktop/addons/sddm/default.nix +++ b/modules/desktop/addons/sddm/default.nix @@ -2,14 +2,16 @@ config, pkgs, lib, + zenyte-lib, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.sddm; in { options.zenyte.desktop.addons.sddm = { - enable = mkEnableOption "Whether to enable sddm."; + enable = mkBoolOpt false "Whether to enable sddm."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/addons/waybar/default.nix b/modules/desktop/addons/waybar/default.nix index 38e9946..cda903b 100644 --- a/modules/desktop/addons/waybar/default.nix +++ b/modules/desktop/addons/waybar/default.nix @@ -2,12 +2,14 @@ config, pkgs, lib, + zenyte-lib, inputs, nixpkgs, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.addons.waybar; mediaplayer-waybar = pkgs.writeShellScriptBin "mediaplayer-waybar" '' while true; do @@ -28,7 +30,7 @@ with lib; let ''; in { options.zenyte.desktop.addons.waybar = { - enable = mkEnableOption "Whether to enable waybar with experimental patches."; + enable = mkBoolOpt false "Whether to enable waybar with experimental patches."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/awesome/default.nix b/modules/desktop/awesome/default.nix index 5ec6608..bfc3fd1 100644 --- a/modules/desktop/awesome/default.nix +++ b/modules/desktop/awesome/default.nix @@ -2,14 +2,16 @@ config, pkgs, lib, + zenyte-lib, inputs, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.awesome; in { options.zenyte.desktop.awesome = { - enable = mkEnableOption "Whether to enable awesomewm."; + enable = mkBoolOpt false "Whether to enable awesomewm."; }; config = mkIf cfg.enable { diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index 32f2b57..6d49ef6 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -2,17 +2,19 @@ config, pkgs, lib, + zenyte-lib, inputs, options, configFolder, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.hyprland; in { options.zenyte.desktop.hyprland = { - enable = mkEnableOption "Whether to enable Hyprland, with other desktop addons."; - nvidiaPatches = mkEnableOption "Whether to enable nvidia patches for hyprland."; + enable = mkBoolOpt false "Whether to enable Hyprland, with other desktop addons."; + nvidiaPatches = mkBoolOpt false "Whether to enable nvidia patches for hyprland."; }; imports = [ diff --git a/modules/desktop/xfce/default.nix b/modules/desktop/xfce/default.nix index e1881ec..6d699e4 100644 --- a/modules/desktop/xfce/default.nix +++ b/modules/desktop/xfce/default.nix @@ -2,13 +2,15 @@ config, pkgs, lib, + zenyte-lib, ... }: -with lib; let +with lib; +with zenyte-lib; let cfg = config.zenyte.desktop.xfce; in { options.zenyte.desktop.xfce = { - enable = mkEnableOption "Whether to enable xfce."; + enable = mkBoolOpt false "Whether to enable xfce."; }; config = mkIf cfg.enable {