1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-31 04:04:32 +00:00

treewide: use mkPackageOption

This commit is contained in:
Austin Horstman 2025-03-29 09:58:45 -05:00
parent 1f679ed2a2
commit d2ba3b260d
No known key found for this signature in database
29 changed files with 39 additions and 195 deletions

View file

@ -10,12 +10,7 @@ in {
programs.alacritty = { programs.alacritty = {
enable = mkEnableOption "Alacritty"; enable = mkEnableOption "Alacritty";
package = mkOption { package = lib.mkPackageOption pkgs "alacritty" { };
type = types.package;
default = pkgs.alacritty;
defaultText = literalExpression "pkgs.alacritty";
description = "The Alacritty package to install.";
};
settings = mkOption { settings = mkOption {
type = tomlFormat.type; type = tomlFormat.type;

View file

@ -13,14 +13,9 @@ in {
programs.eclipse = { programs.eclipse = {
enable = mkEnableOption "Eclipse"; enable = mkEnableOption "Eclipse";
package = mkOption { package = lib.mkPackageOption pkgs "eclipse" {
type = types.package; default = [ "eclipses" "eclipse-platform" ];
default = pkgs.eclipses.eclipse-platform; example = "pkgs.eclipses.eclipse-java";
defaultText = literalExpression "pkgs.eclipses.eclipse-platform";
example = literalExpression "pkgs.eclipses.eclipse-java";
description = ''
The Eclipse package to install.
'';
}; };
enableLombok = mkOption { enableLombok = mkOption {

View file

@ -13,15 +13,7 @@ in {
options.programs.eww = { options.programs.eww = {
enable = mkEnableOption "eww"; enable = mkEnableOption "eww";
package = mkOption { package = lib.mkPackageOption pkgs "eww" { };
type = types.package;
default = pkgs.eww;
defaultText = literalExpression "pkgs.eww";
example = literalExpression "pkgs.eww";
description = ''
The eww package to install.
'';
};
configDir = mkOption { configDir = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;

View file

@ -254,14 +254,7 @@ in {
programs.fish = { programs.fish = {
enable = mkEnableOption "fish, the friendly interactive shell"; enable = mkEnableOption "fish, the friendly interactive shell";
package = mkOption { package = lib.mkPackageOption pkgs "fish" { };
type = types.package;
default = pkgs.fish;
defaultText = literalExpression "pkgs.fish";
description = ''
The fish package to install. May be used to change the version.
'';
};
generateCompletions = mkEnableOption generateCompletions = mkEnableOption
"the automatic generation of completions based upon installed man pages" "the automatic generation of completions based upon installed man pages"

View file

@ -13,12 +13,7 @@ in {
options.programs.foot = { options.programs.foot = {
enable = mkEnableOption "Foot terminal"; enable = mkEnableOption "Foot terminal";
package = mkOption { package = lib.mkPackageOption pkgs "foot" { };
type = types.package;
default = pkgs.foot;
defaultText = literalExpression "pkgs.foot";
description = "The foot package to install";
};
server.enable = mkEnableOption "Foot terminal server"; server.enable = mkEnableOption "Foot terminal server";

View file

@ -76,12 +76,10 @@ in {
programs.git = { programs.git = {
enable = mkEnableOption "Git"; enable = mkEnableOption "Git";
package = mkOption { package = lib.mkPackageOption pkgs "git" {
type = types.package; example = "pkgs.gitFull";
default = pkgs.git; extraDescription = ''
defaultText = literalExpression "pkgs.git"; Use {var}`pkgs.gitFull`
description = ''
Git package to install. Use {var}`pkgs.gitAndTools.gitFull`
to gain access to {command}`git send-email` for instance. to gain access to {command}`git send-email` for instance.
''; '';
}; };

View file

@ -14,14 +14,7 @@ in {
options.programs.ion = { options.programs.ion = {
enable = mkEnableOption "the Ion Shell. Compatible with Redox and Linux"; enable = mkEnableOption "the Ion Shell. Compatible with Redox and Linux";
package = mkOption { package = lib.mkPackageOption pkgs "ion" { };
type = types.package;
default = pkgs.ion;
defaultText = literalExpression "pkgs.ion";
description = ''
The ion package to install. May be used to change the version.
'';
};
initExtra = mkOption { initExtra = mkOption {
type = types.lines; type = types.lines;

View file

@ -21,14 +21,9 @@ in {
''; '';
}; };
package = mkOption { package = lib.mkPackageOption pkgs "java" {
type = types.package; default = "jdk";
default = pkgs.jdk; example = "pkgs.jre";
defaultText = "pkgs.jdk";
description = ''
Java package to install. Typical values are
`pkgs.jdk` or `pkgs.jre`.
'';
}; };
}; };
}; };

View file

@ -21,14 +21,7 @@ in {
options.programs.keychain = { options.programs.keychain = {
enable = mkEnableOption "keychain"; enable = mkEnableOption "keychain";
package = mkOption { package = lib.mkPackageOption pkgs "keychain" { };
type = types.package;
default = pkgs.keychain;
defaultText = literalExpression "pkgs.keychain";
description = ''
Keychain package to install.
'';
};
keys = mkOption { keys = mkOption {
type = types.listOf types.str; type = types.listOf types.str;

View file

@ -89,14 +89,7 @@ in {
options.programs.kitty = { options.programs.kitty = {
enable = mkEnableOption "Kitty terminal emulator"; enable = mkEnableOption "Kitty terminal emulator";
package = mkOption { package = lib.mkPackageOption pkgs "kitty" { };
type = types.package;
default = pkgs.kitty;
defaultText = literalExpression "pkgs.kitty";
description = ''
Kitty package to install.
'';
};
darwinLaunchOptions = mkOption { darwinLaunchOptions = mkOption {
type = types.nullOr (types.listOf types.str); type = types.nullOr (types.listOf types.str);

View file

@ -28,12 +28,7 @@ in {
programs.mangohud = { programs.mangohud = {
enable = mkEnableOption "Mangohud"; enable = mkEnableOption "Mangohud";
package = mkOption { package = lib.mkPackageOption pkgs "mangohud" { };
type = types.package;
default = pkgs.mangohud;
defaultText = literalExpression "pkgs.mangohud";
description = "The Mangohud package to install.";
};
enableSessionWide = mkOption { enableSessionWide = mkOption {
type = types.bool; type = types.bool;

View file

@ -14,12 +14,7 @@ in {
programs.mercurial = { programs.mercurial = {
enable = mkEnableOption "Mercurial"; enable = mkEnableOption "Mercurial";
package = mkOption { package = lib.mkPackageOption pkgs "mercurial" { };
type = types.package;
default = pkgs.mercurial;
defaultText = literalExpression "pkgs.mercurial";
description = "Mercurial package to install.";
};
userName = mkOption { userName = mkOption {
type = types.str; type = types.str;

View file

@ -10,12 +10,7 @@ in {
options.programs.mods = { options.programs.mods = {
enable = mkEnableOption "mods"; enable = mkEnableOption "mods";
package = mkOption { package = lib.mkPackageOption pkgs "mods" { };
type = types.package;
default = pkgs.mods;
defaultText = literalExpression "pkgs.mods";
description = "The mods package to install";
};
settings = mkOption { settings = mkOption {
type = yamlFormat.type; type = yamlFormat.type;

View file

@ -13,14 +13,7 @@ in {
programs.obs-studio = { programs.obs-studio = {
enable = mkEnableOption "obs-studio"; enable = mkEnableOption "obs-studio";
package = mkOption { package = lib.mkPackageOption pkgs "obs-studio" { };
type = types.package;
default = pkgs.obs-studio;
defaultText = literalExpression "pkgs.obs-studio";
description = ''
OBS Studio package to install.
'';
};
finalPackage = mkOption { finalPackage = mkOption {
type = types.package; type = types.package;

View file

@ -12,12 +12,7 @@ in {
options.programs.opam = { options.programs.opam = {
enable = mkEnableOption "Opam"; enable = mkEnableOption "Opam";
package = mkOption { package = lib.mkPackageOption pkgs "opam" { };
type = types.package;
default = pkgs.opam;
defaultText = literalExpression "pkgs.opam";
description = "Opam package to install.";
};
enableBashIntegration = enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; }; lib.hm.shell.mkBashIntegrationOption { inherit config; };

View file

@ -11,12 +11,7 @@ in {
options.programs.pqiv = { options.programs.pqiv = {
enable = mkEnableOption "pqiv image viewer"; enable = mkEnableOption "pqiv image viewer";
package = mkOption { package = lib.mkPackageOption pkgs "pqiv" { };
type = types.package;
default = pkgs.pqiv;
defaultText = literalExpression "pkgs.pqiv";
description = "The pqiv package to install.";
};
settings = mkOption { settings = mkOption {
type = iniFormat.type; type = iniFormat.type;

View file

@ -41,12 +41,7 @@ in {
options.programs.qutebrowser = { options.programs.qutebrowser = {
enable = mkEnableOption "qutebrowser"; enable = mkEnableOption "qutebrowser";
package = mkOption { package = lib.mkPackageOption pkgs "qutebrowser" { };
type = types.package;
default = pkgs.qutebrowser;
defaultText = literalExpression "pkgs.qutebrowser";
description = "Qutebrowser package to install.";
};
aliases = mkOption { aliases = mkOption {
type = types.attrsOf types.str; type = types.attrsOf types.str;

View file

@ -8,12 +8,9 @@ in {
options.programs.swayimg = { options.programs.swayimg = {
enable = lib.mkEnableOption "swayimg"; enable = lib.mkEnableOption "swayimg";
package = lib.mkOption {
type = lib.types.package; package = lib.mkPackageOption pkgs "swayimg" { };
default = pkgs.swayimg;
defaultText = lib.literalExpression "pkgs.swayimg";
description = "The swayimg package to install";
};
settings = lib.mkOption { settings = lib.mkOption {
type = iniFormat.type; type = iniFormat.type;
default = { }; default = { };

View file

@ -33,12 +33,7 @@ in {
options.programs.terminator = { options.programs.terminator = {
enable = mkEnableOption "terminator, a tiling terminal emulator"; enable = mkEnableOption "terminator, a tiling terminal emulator";
package = mkOption { package = lib.mkPackageOption pkgs "terminator" { };
type = types.package;
default = pkgs.terminator;
example = literalExpression "pkgs.terminator";
description = "terminator package to install.";
};
config = mkOption { config = mkOption {
default = { }; default = { };

View file

@ -13,12 +13,7 @@ in {
enable = enable =
mkEnableOption "tint2, a simple, unobtrusive and light panel for Xorg"; mkEnableOption "tint2, a simple, unobtrusive and light panel for Xorg";
package = mkOption { package = lib.mkPackageOption pkgs "tint2" { };
type = types.package;
default = pkgs.tint2;
defaultText = literalExpression "pkgs.tint2";
description = "Tint2 package to install.";
};
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;

View file

@ -15,12 +15,7 @@ in {
programs.tiny = { programs.tiny = {
enable = mkEnableOption "tiny, a TUI IRC client written in Rust"; enable = mkEnableOption "tiny, a TUI IRC client written in Rust";
package = mkOption { package = lib.mkPackageOption pkgs "tiny" { };
type = types.package;
default = pkgs.tiny;
defaultText = literalExpression "pkgs.tiny";
description = "The {command}`tiny` package to install.";
};
settings = mkOption { settings = mkOption {
type = format.type; type = format.type;

View file

@ -13,13 +13,7 @@ in {
programs.tmate = { programs.tmate = {
enable = mkEnableOption "tmate"; enable = mkEnableOption "tmate";
package = mkOption { package = lib.mkPackageOption pkgs "tmate" { };
type = types.package;
default = pkgs.tmate;
defaultText = literalExpression "pkgs.tmate";
example = literalExpression "pkgs.tmate";
description = "The tmate package to install.";
};
host = mkOption { host = mkOption {
type = with types; nullOr str; type = with types; nullOr str;

View file

@ -226,13 +226,7 @@ in {
''; '';
}; };
package = mkOption { package = lib.mkPackageOption pkgs "tmux" { };
type = types.package;
default = pkgs.tmux;
defaultText = literalExpression "pkgs.tmux";
example = literalExpression "pkgs.tmux";
description = "The tmux package to install";
};
reverseSplit = mkOption { reverseSplit = mkOption {
default = false; default = false;

View file

@ -10,12 +10,7 @@ in {
options.programs.urxvt = { options.programs.urxvt = {
enable = mkEnableOption "rxvt-unicode terminal emulator"; enable = mkEnableOption "rxvt-unicode terminal emulator";
package = mkOption { package = lib.mkPackageOption pkgs "rxvt-unicode" { };
type = types.package;
default = pkgs.rxvt-unicode;
defaultText = literalExpression "pkgs.rxvt-unicode";
description = "rxvt-unicode package to install.";
};
fonts = mkOption { fonts = mkOption {
type = types.listOf types.str; type = types.listOf types.str;

View file

@ -16,12 +16,7 @@ in {
options.programs.wezterm = { options.programs.wezterm = {
enable = mkEnableOption "wezterm"; enable = mkEnableOption "wezterm";
package = mkOption { package = lib.mkPackageOption pkgs "wezterm" { };
type = types.package;
default = pkgs.wezterm;
defaultText = literalExpression "pkgs.wezterm";
description = "The Wezterm package to install.";
};
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;

View file

@ -9,14 +9,7 @@ in {
options.programs.zoxide = { options.programs.zoxide = {
enable = lib.mkEnableOption "zoxide"; enable = lib.mkEnableOption "zoxide";
package = lib.mkOption { package = lib.mkPackageOption pkgs "zoxide" { };
type = lib.types.package;
default = pkgs.zoxide;
defaultText = lib.literalExpression "pkgs.zoxide";
description = ''
Zoxide package to install.
'';
};
options = lib.mkOption { options = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;

View file

@ -14,12 +14,7 @@ in {
enableNotifications = mkEnableOption "lorri build notifications"; enableNotifications = mkEnableOption "lorri build notifications";
package = mkOption { package = lib.mkPackageOption pkgs "lorri" { };
type = types.package;
default = pkgs.lorri;
defaultText = literalExpression "pkgs.lorri";
description = "Which lorri package to install.";
};
nixPackage = mkOption { nixPackage = mkOption {
type = types.package; type = types.package;

View file

@ -72,12 +72,8 @@ in {
services.polybar = { services.polybar = {
enable = mkEnableOption "Polybar status bar"; enable = mkEnableOption "Polybar status bar";
package = mkOption { package = lib.mkPackageOption pkgs "polybar" {
type = types.package; example = ''
default = pkgs.polybar;
defaultText = literalExpression "pkgs.polybar";
description = "Polybar package to install.";
example = literalExpression ''
pkgs.polybar.override { pkgs.polybar.override {
i3GapsSupport = true; i3GapsSupport = true;
alsaSupport = true; alsaSupport = true;

View file

@ -49,12 +49,7 @@ in {
in { in {
enable = mkEnableOption "idle manager for Wayland"; enable = mkEnableOption "idle manager for Wayland";
package = mkOption { package = lib.mkPackageOption pkgs "swayidle" { };
type = types.package;
default = pkgs.swayidle;
defaultText = literalExpression "pkgs.swayidle";
description = "Swayidle package to install.";
};
timeouts = mkOption { timeouts = mkOption {
type = with types; listOf (submodule timeoutModule); type = with types; listOf (submodule timeoutModule);