mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 01:04:25 +00:00
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package type, to be `mkPackageOption`, in order to reduce the amount of code.
This commit is contained in:
parent
9cc575741d
commit
0a37316d6c
@ -24,14 +24,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ckb-next;
|
||||
defaultText = literalExpression "pkgs.ckb-next";
|
||||
description = lib.mdDoc ''
|
||||
The package implementing the Corsair keyboard/mouse driver.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "ckb-next" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -16,11 +16,10 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.digitalbitbox;
|
||||
defaultText = literalExpression "pkgs.digitalbitbox";
|
||||
description = lib.mdDoc "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
|
||||
package = mkPackageOption pkgs "digitalbitbox" {
|
||||
extraDescription = ''
|
||||
This can be used to install a package with udev rules that differ from the defaults.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -26,14 +26,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.opentabletdriver;
|
||||
defaultText = literalExpression "pkgs.opentabletdriver";
|
||||
description = lib.mdDoc ''
|
||||
OpenTabletDriver derivation to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "opentabletdriver" { };
|
||||
|
||||
daemon = {
|
||||
enable = mkOption {
|
||||
|
@ -26,14 +26,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.findutils.locate;
|
||||
defaultText = literalExpression "pkgs.findutils.locate";
|
||||
example = literalExpression "pkgs.mlocate";
|
||||
description = lib.mdDoc ''
|
||||
The locate implementation to use
|
||||
'';
|
||||
package = mkPackageOption pkgs [ "findutils" "locate" ] {
|
||||
example = "mlocate";
|
||||
};
|
||||
|
||||
interval = mkOption {
|
||||
|
@ -16,14 +16,7 @@ in
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "Atop");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.atop;
|
||||
defaultText = literalExpression "pkgs.atop";
|
||||
description = lib.mdDoc ''
|
||||
Which package to use for Atop.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "atop" { };
|
||||
|
||||
netatop = {
|
||||
enable = mkOption {
|
||||
|
@ -5,7 +5,8 @@ let
|
||||
|
||||
inherit (lib)
|
||||
concatStringsSep escapeShellArgs optionalString
|
||||
literalExpression mkEnableOption mkIf mkOption mkOptionDefault types;
|
||||
literalExpression mkEnableOption mkPackageOption mkIf mkOption
|
||||
mkOptionDefault types;
|
||||
|
||||
requiresSetcapWrapper = config.boot.kernelPackages.kernelOlder "5.7" && cfg.bindInterface;
|
||||
|
||||
@ -50,12 +51,7 @@ in
|
||||
programs.captive-browser = {
|
||||
enable = mkEnableOption (lib.mdDoc "captive browser");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.captive-browser;
|
||||
defaultText = literalExpression "pkgs.captive-browser";
|
||||
description = lib.mdDoc "Which package to use for captive-browser";
|
||||
};
|
||||
package = mkPackageOption pkgs "captive-browser" { };
|
||||
|
||||
interface = mkOption {
|
||||
type = types.str;
|
||||
|
@ -16,11 +16,10 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.digitalbitbox;
|
||||
defaultText = literalExpression "pkgs.digitalbitbox";
|
||||
description = lib.mdDoc "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
|
||||
package = mkPackageOption pkgs "digitalbitbox" {
|
||||
extraDescription = ''
|
||||
This can be used to install a package with udev rules that differ from the defaults.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -21,12 +21,7 @@ in {
|
||||
relatedPackages = [ "dmrconfig" ];
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.dmrconfig;
|
||||
type = types.package;
|
||||
defaultText = literalExpression "pkgs.dmrconfig";
|
||||
description = lib.mdDoc "dmrconfig derivation to use";
|
||||
};
|
||||
package = mkPackageOption pkgs "dmrconfig" { };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -24,12 +24,7 @@ in {
|
||||
enable = mkEnableOption
|
||||
(lib.mdDoc "Evince, the GNOME document viewer");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.evince;
|
||||
defaultText = literalExpression "pkgs.evince";
|
||||
description = lib.mdDoc "Evince derivation to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "evince" { };
|
||||
|
||||
};
|
||||
|
||||
|
@ -12,14 +12,7 @@ in {
|
||||
|
||||
Your user needs to be in the `feedbackd` group to trigger effects
|
||||
'');
|
||||
package = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Which feedbackd package to use.
|
||||
'';
|
||||
type = types.package;
|
||||
default = pkgs.feedbackd;
|
||||
defaultText = literalExpression "pkgs.feedbackd";
|
||||
};
|
||||
package = mkPackageOption pkgs "feedbackd" { };
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -23,12 +23,7 @@ in {
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "File Roller, an archive manager for GNOME");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gnome.file-roller;
|
||||
defaultText = literalExpression "pkgs.gnome.file-roller";
|
||||
description = lib.mdDoc "File Roller derivation to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs [ "gnome" "file-roller" ] { };
|
||||
|
||||
};
|
||||
|
||||
|
@ -9,12 +9,7 @@ in {
|
||||
programs.flexoptix-app = {
|
||||
enable = mkEnableOption (lib.mdDoc "FLEXOPTIX app + udev rules");
|
||||
|
||||
package = mkOption {
|
||||
description = lib.mdDoc "FLEXOPTIX app package to use";
|
||||
type = types.package;
|
||||
default = pkgs.flexoptix-app;
|
||||
defaultText = literalExpression "pkgs.flexoptix-app";
|
||||
};
|
||||
package = mkPackageOption pkgs "flexoptix-app" { };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -23,14 +23,7 @@ in
|
||||
options.programs.gamescope = {
|
||||
enable = mkEnableOption (mdDoc "gamescope");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gamescope;
|
||||
defaultText = literalExpression "pkgs.gamescope";
|
||||
description = mdDoc ''
|
||||
The GameScope package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "gamescope" { };
|
||||
|
||||
capSysNice = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -11,12 +11,8 @@ in
|
||||
programs.git = {
|
||||
enable = mkEnableOption (lib.mdDoc "git");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.git;
|
||||
defaultText = literalExpression "pkgs.git";
|
||||
example = literalExpression "pkgs.gitFull";
|
||||
description = lib.mdDoc "The git package to use";
|
||||
package = mkPackageOption pkgs "git" {
|
||||
example = "gitFull";
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
@ -65,12 +61,7 @@ in
|
||||
lfs = {
|
||||
enable = mkEnableOption (lib.mdDoc "git-lfs");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.git-lfs;
|
||||
defaultText = literalExpression "pkgs.git-lfs";
|
||||
description = lib.mdDoc "The git-lfs package to use";
|
||||
};
|
||||
package = mkPackageOption pkgs "git-lfs" { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -29,14 +29,7 @@ in
|
||||
{
|
||||
|
||||
options.programs.gnupg = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gnupg;
|
||||
defaultText = literalExpression "pkgs.gnupg";
|
||||
description = lib.mdDoc ''
|
||||
The gpg package that should be used.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "gnupg" { };
|
||||
|
||||
agent.enable = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -18,14 +18,7 @@ in
|
||||
{
|
||||
|
||||
options.programs.htop = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.htop;
|
||||
defaultText = lib.literalExpression "pkgs.htop";
|
||||
description = lib.mdDoc ''
|
||||
The htop package that should be used.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "htop" { };
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "htop process monitor");
|
||||
|
||||
|
@ -13,16 +13,12 @@ in {
|
||||
options = {
|
||||
programs.i3lock = {
|
||||
enable = mkEnableOption (mdDoc "i3lock");
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.i3lock;
|
||||
defaultText = literalExpression "pkgs.i3lock";
|
||||
example = literalExpression ''
|
||||
pkgs.i3lock-color
|
||||
'';
|
||||
description = mdDoc ''
|
||||
Specify which package to use for the i3lock program,
|
||||
package = mkPackageOption pkgs "i3lock" {
|
||||
example = "i3lock-color";
|
||||
extraDescription = ''
|
||||
::: {.note}
|
||||
The i3lock package must include a i3lock file or link in its out directory in order for the u2fSupport option to work correctly.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
u2fSupport = mkOption {
|
||||
|
@ -30,13 +30,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.jdk;
|
||||
defaultText = literalExpression "pkgs.jdk";
|
||||
description = lib.mdDoc ''
|
||||
Java package to install. Typical values are pkgs.jdk or pkgs.jre.
|
||||
'';
|
||||
type = types.package;
|
||||
package = mkPackageOption pkgs "jdk" {
|
||||
example = "jre";
|
||||
};
|
||||
|
||||
binfmt = mkEnableOption (lib.mdDoc "binfmt to execute java jar's and classes");
|
||||
|
@ -20,15 +20,7 @@ in
|
||||
default = "k40";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.k40-whisperer;
|
||||
defaultText = literalExpression "pkgs.k40-whisperer";
|
||||
example = literalExpression "pkgs.k40-whisperer";
|
||||
description = lib.mdDoc ''
|
||||
K40 Whisperer package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "k40-whisperer" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -11,14 +11,8 @@ with lib;
|
||||
`gnomeExtensions.gsconnect` as an alternative
|
||||
implementation if you use Gnome
|
||||
'');
|
||||
package = mkOption {
|
||||
default = pkgs.plasma5Packages.kdeconnect-kde;
|
||||
defaultText = literalExpression "pkgs.plasma5Packages.kdeconnect-kde";
|
||||
type = types.package;
|
||||
example = literalExpression "pkgs.gnomeExtensions.gsconnect";
|
||||
description = lib.mdDoc ''
|
||||
The package providing the implementation for kdeconnect.
|
||||
'';
|
||||
package = mkPackageOption pkgs [ "plasma5Packages" "kdeconnect-kde" ] {
|
||||
example = "gnomeExtensions.gsconnect";
|
||||
};
|
||||
};
|
||||
config =
|
||||
|
@ -17,14 +17,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.mtr;
|
||||
defaultText = literalExpression "pkgs.mtr";
|
||||
description = lib.mdDoc ''
|
||||
The package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "mtr" { };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -86,12 +86,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.neovim-unwrapped;
|
||||
defaultText = literalExpression "pkgs.neovim-unwrapped";
|
||||
description = lib.mdDoc "The package to use for the neovim binary.";
|
||||
};
|
||||
package = mkPackageOption pkgs "neovim-unwrapped" { };
|
||||
|
||||
finalPackage = mkOption {
|
||||
type = types.package;
|
||||
|
@ -5,12 +5,7 @@ in {
|
||||
options.programs.nix-index = with lib; {
|
||||
enable = mkEnableOption (lib.mdDoc "nix-index, a file database for nixpkgs");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nix-index;
|
||||
defaultText = literalExpression "pkgs.nix-index";
|
||||
description = lib.mdDoc "Package providing the `nix-index` tool.";
|
||||
};
|
||||
package = mkPackageOption pkgs "nix-index" { };
|
||||
|
||||
enableBashIntegration = mkEnableOption (lib.mdDoc "Bash integration") // {
|
||||
default = true;
|
||||
|
@ -23,12 +23,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.nncp;
|
||||
defaultText = literalExpression "pkgs.nncp";
|
||||
description = lib.mdDoc "The NNCP package to use system-wide.";
|
||||
};
|
||||
package = mkPackageOption pkgs "nncp" { };
|
||||
|
||||
secrets = mkOption {
|
||||
type = with types; listOf str;
|
||||
|
@ -8,14 +8,7 @@ in
|
||||
options.programs.noisetorch = {
|
||||
enable = mkEnableOption (lib.mdDoc "noisetorch + setcap wrapper");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.noisetorch;
|
||||
defaultText = literalExpression "pkgs.noisetorch";
|
||||
description = lib.mdDoc ''
|
||||
The noisetorch package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "noisetorch" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -13,12 +13,8 @@ in
|
||||
programs.npm = {
|
||||
enable = mkEnableOption (lib.mdDoc "{command}`npm` global config");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = lib.mdDoc "The npm package version / flavor to use";
|
||||
default = pkgs.nodePackages.npm;
|
||||
defaultText = literalExpression "pkgs.nodePackages.npm";
|
||||
example = literalExpression "pkgs.nodePackages_13_x.npm";
|
||||
package = mkPackageOption pkgs [ "nodePackages" "npm" ] {
|
||||
example = "nodePackages_13_x.npm";
|
||||
};
|
||||
|
||||
npmrc = mkOption {
|
||||
|
@ -51,8 +51,8 @@ in {
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "installing proxychains configuration");
|
||||
|
||||
package = mkPackageOptionMD pkgs "proxychains" {
|
||||
example = "pkgs.proxychains-ng";
|
||||
package = mkPackageOption pkgs "proxychains" {
|
||||
example = "proxychains-ng";
|
||||
};
|
||||
|
||||
chain = {
|
||||
|
@ -12,14 +12,8 @@ in
|
||||
Whether to install Singularity/Apptainer with system-level overriding such as SUID support.
|
||||
'';
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.singularity;
|
||||
defaultText = literalExpression "pkgs.singularity";
|
||||
example = literalExpression "pkgs.apptainer";
|
||||
description = mdDoc ''
|
||||
Singularity/Apptainer package to override and install.
|
||||
'';
|
||||
package = mkPackageOption pkgs "singularity" {
|
||||
example = "apptainer";
|
||||
};
|
||||
packageOverriden = mkOption {
|
||||
type = types.nullOr types.package;
|
||||
|
@ -132,14 +132,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.openssh;
|
||||
defaultText = literalExpression "pkgs.openssh";
|
||||
description = lib.mdDoc ''
|
||||
The package used for the openssh client and daemon.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "openssh" { };
|
||||
|
||||
knownHosts = mkOption {
|
||||
default = {};
|
||||
|
@ -5,7 +5,7 @@ let
|
||||
inherit (builtins) length map;
|
||||
inherit (lib.attrsets) attrNames filterAttrs hasAttr mapAttrs mapAttrsToList optionalAttrs;
|
||||
inherit (lib.modules) mkDefault mkIf;
|
||||
inherit (lib.options) literalExpression mkEnableOption mkOption;
|
||||
inherit (lib.options) literalExpression mkEnableOption mkOption mkPackageOption;
|
||||
inherit (lib.strings) concatLines optionalString toLower;
|
||||
inherit (lib.types) addCheck attrsOf lines nonEmptyStr nullOr package path port str strMatching submodule;
|
||||
|
||||
@ -215,14 +215,9 @@ let
|
||||
TSM-depending packages used on the system.
|
||||
'';
|
||||
};
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.tsm-client;
|
||||
defaultText = literalExpression "pkgs.tsm-client";
|
||||
example = literalExpression "pkgs.tsm-client-withGui";
|
||||
description = lib.mdDoc ''
|
||||
The TSM client derivation to be
|
||||
added to the system environment.
|
||||
package = mkPackageOption pkgs "tsm-client" {
|
||||
example = "tsm-client-withGui";
|
||||
extraDescription = ''
|
||||
It will be used with `.override`
|
||||
to add paths to the client system-options file.
|
||||
'';
|
||||
|
@ -15,14 +15,8 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.vim;
|
||||
defaultText = literalExpression "pkgs.vim";
|
||||
example = literalExpression "pkgs.vim-full";
|
||||
description = lib.mdDoc ''
|
||||
vim package to use.
|
||||
'';
|
||||
package = mkPackageOption pkgs "vim" {
|
||||
example = "vim-full";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -10,12 +10,9 @@ in {
|
||||
options.programs.river = {
|
||||
enable = mkEnableOption (lib.mdDoc "river, a dynamic tiling Wayland compositor");
|
||||
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.river;
|
||||
defaultText = literalExpression "pkgs.river";
|
||||
description = lib.mdDoc ''
|
||||
River package to use.
|
||||
package = mkPackageOption pkgs "river" {
|
||||
nullable = true;
|
||||
extraDescription = ''
|
||||
Set to `null` to not add any River package to your path.
|
||||
This should be done if you want to use the Home Manager River module to install River.
|
||||
'';
|
||||
|
@ -26,12 +26,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = pkgs.weylus;
|
||||
defaultText = lib.literalExpression "pkgs.weylus";
|
||||
description = lib.mdDoc "Weylus package to install.";
|
||||
};
|
||||
package = mkPackageOption pkgs "weylus" { };
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
|
@ -16,13 +16,8 @@ in {
|
||||
setcap wrapper for 'dumpcap' for users in the 'wireshark' group.
|
||||
'';
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.wireshark-cli;
|
||||
defaultText = literalExpression "pkgs.wireshark-cli";
|
||||
description = lib.mdDoc ''
|
||||
Which Wireshark package to install in the global environment.
|
||||
'';
|
||||
package = mkPackageOption pkgs "wireshark-cli" {
|
||||
example = "wireshark";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -24,14 +24,8 @@ in
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.xonsh;
|
||||
defaultText = literalExpression "pkgs.xonsh";
|
||||
example = literalExpression "pkgs.xonsh.override { extraPackages = ps: [ ps.requests ]; }";
|
||||
description = lib.mdDoc ''
|
||||
xonsh package to use.
|
||||
'';
|
||||
package = mkPackageOption pkgs "xonsh" {
|
||||
example = "xonsh.override { extraPackages = ps: [ ps.requests ]; }";
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
|
@ -46,15 +46,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.oh-my-zsh;
|
||||
defaultText = literalExpression "pkgs.oh-my-zsh";
|
||||
description = lib.mdDoc ''
|
||||
Package to install for `oh-my-zsh` usage.
|
||||
'';
|
||||
|
||||
type = types.package;
|
||||
};
|
||||
package = mkPackageOption pkgs "oh-my-zsh" { };
|
||||
|
||||
plugins = mkOption {
|
||||
default = [];
|
||||
|
@ -8,15 +8,7 @@ in {
|
||||
options = {
|
||||
programs.zsh.zsh-autoenv = {
|
||||
enable = mkEnableOption (lib.mdDoc "zsh-autoenv");
|
||||
package = mkOption {
|
||||
default = pkgs.zsh-autoenv;
|
||||
defaultText = literalExpression "pkgs.zsh-autoenv";
|
||||
description = lib.mdDoc ''
|
||||
Package to install for `zsh-autoenv` usage.
|
||||
'';
|
||||
|
||||
type = types.package;
|
||||
};
|
||||
package = mkPackageOption pkgs "zsh-autoenv" { };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -13,14 +13,7 @@ in
|
||||
file as another user
|
||||
'');
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.please;
|
||||
defaultText = literalExpression "pkgs.please";
|
||||
description = mdDoc ''
|
||||
Which package to use for {command}`please`.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "please" { };
|
||||
|
||||
wheelNeedsPassword = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -60,14 +60,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.sudo-rs;
|
||||
defaultText = literalExpression "pkgs.sudo-rs";
|
||||
description = mdDoc ''
|
||||
Which package to use for `sudo`.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "sudo-rs" { };
|
||||
|
||||
wheelNeedsPassword = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -6,12 +6,7 @@ let
|
||||
in with lib; {
|
||||
options.services.meshcentral = with types; {
|
||||
enable = mkEnableOption (lib.mdDoc "MeshCentral computer management server");
|
||||
package = mkOption {
|
||||
description = lib.mdDoc "MeshCentral package to use. Replacing this may be necessary to add dependencies for extra functionality.";
|
||||
type = types.package;
|
||||
default = pkgs.meshcentral;
|
||||
defaultText = literalExpression "pkgs.meshcentral";
|
||||
};
|
||||
package = mkPackageOption pkgs "meshcentral" { };
|
||||
settings = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Settings for MeshCentral. Refer to upstream documentation for details:
|
||||
|
@ -26,14 +26,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.rabbitmq-server;
|
||||
type = types.package;
|
||||
defaultText = literalExpression "pkgs.rabbitmq-server";
|
||||
description = lib.mdDoc ''
|
||||
Which rabbitmq package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "rabbitmq-server" { };
|
||||
|
||||
listenAddress = mkOption {
|
||||
default = "127.0.0.1";
|
||||
|
@ -14,12 +14,7 @@ in
|
||||
options.services.botamusique = {
|
||||
enable = mkEnableOption (lib.mdDoc "botamusique, a bot to play audio streams on mumble");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.botamusique;
|
||||
defaultText = literalExpression "pkgs.botamusique";
|
||||
description = lib.mdDoc "The botamusique package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "botamusique" { };
|
||||
|
||||
settings = mkOption {
|
||||
type = with types; submodule {
|
||||
|
@ -20,16 +20,11 @@ in {
|
||||
JACK Audio Connection Kit. You need to add yourself to the "jackaudio" group
|
||||
'');
|
||||
|
||||
package = mkOption {
|
||||
package = mkPackageOption pkgs "jack2" {
|
||||
example = "jack1";
|
||||
} // {
|
||||
# until jack1 promiscuous mode is fixed
|
||||
internal = true;
|
||||
type = types.package;
|
||||
default = pkgs.jack2;
|
||||
defaultText = literalExpression "pkgs.jack2";
|
||||
example = literalExpression "pkgs.jack1";
|
||||
description = lib.mdDoc ''
|
||||
The JACK package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
extraOptions = mkOption {
|
||||
|
@ -9,12 +9,7 @@ in
|
||||
services.jmusicbot = {
|
||||
enable = mkEnableOption (lib.mdDoc "jmusicbot, a Discord music bot that's easy to set up and run yourself");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.jmusicbot;
|
||||
defaultText = literalExpression "pkgs.jmusicbot";
|
||||
description = lib.mdDoc "JMusicBot package to use";
|
||||
};
|
||||
package = mkPackageOption pkgs "jmusicbot" { };
|
||||
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
|
@ -19,12 +19,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.slimserver;
|
||||
defaultText = literalExpression "pkgs.slimserver";
|
||||
description = lib.mdDoc "Slimserver package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "slimserver" { };
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
|
@ -5,12 +5,8 @@ with lib;
|
||||
let
|
||||
receiverSubmodule = {
|
||||
options = {
|
||||
postgresqlPackage = mkOption {
|
||||
type = types.package;
|
||||
example = literalExpression "pkgs.postgresql_15";
|
||||
description = lib.mdDoc ''
|
||||
PostgreSQL package to use.
|
||||
'';
|
||||
postgresqlPackage = mkPackageOption pkgs "postgresql" {
|
||||
example = "postgresql_15";
|
||||
};
|
||||
|
||||
directory = mkOption {
|
||||
|
@ -57,12 +57,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.restic-rest-server;
|
||||
defaultText = literalExpression "pkgs.restic-rest-server";
|
||||
type = types.package;
|
||||
description = lib.mdDoc "Restic REST server package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "restic-rest-server" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -245,14 +245,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.restic;
|
||||
defaultText = literalExpression "pkgs.restic";
|
||||
description = lib.mdDoc ''
|
||||
Restic package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "restic" { };
|
||||
|
||||
createWrapper = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
|
@ -13,12 +13,7 @@ in
|
||||
services.zrepl = {
|
||||
enable = mkEnableOption (lib.mdDoc "zrepl");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.zrepl;
|
||||
defaultText = literalExpression "pkgs.zrepl";
|
||||
description = lib.mdDoc "Which package to use for zrepl";
|
||||
};
|
||||
package = mkPackageOption pkgs "zrepl" { };
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
|
@ -135,12 +135,7 @@ let
|
||||
default = [];
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.go-ethereum.geth;
|
||||
defaultText = literalExpression "pkgs.go-ethereum.geth";
|
||||
type = types.package;
|
||||
description = lib.mdDoc "Package to use as Go Ethereum node.";
|
||||
};
|
||||
package = mkPackageOption pkgs [ "go-ethereum" "geth" ] { };
|
||||
};
|
||||
};
|
||||
in
|
||||
|
@ -9,12 +9,7 @@ in
|
||||
options.services.corosync = {
|
||||
enable = mkEnableOption (lib.mdDoc "corosync");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.corosync;
|
||||
defaultText = literalExpression "pkgs.corosync";
|
||||
description = lib.mdDoc "Package that should be used for corosync.";
|
||||
};
|
||||
package = mkPackageOption pkgs "corosync" { };
|
||||
|
||||
clusterName = mkOption {
|
||||
type = types.str;
|
||||
|
@ -199,12 +199,7 @@ with lib;
|
||||
|
||||
gatewayRole.enable = mkEnableOption (lib.mdDoc "gateway role for deploying hadoop configs");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.hadoop;
|
||||
defaultText = literalExpression "pkgs.hadoop";
|
||||
description = lib.mdDoc "";
|
||||
};
|
||||
package = mkPackageOption pkgs "hadoop" { };
|
||||
};
|
||||
|
||||
|
||||
|
@ -134,12 +134,7 @@ in
|
||||
|
||||
hbase = {
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.hbase;
|
||||
defaultText = literalExpression "pkgs.hbase";
|
||||
description = mdDoc "HBase package";
|
||||
};
|
||||
package = mkPackageOption pkgs "hbase" { };
|
||||
|
||||
rootdir = mkOption {
|
||||
description = mdDoc ''
|
||||
|
@ -15,12 +15,7 @@ in
|
||||
options.services.k3s = {
|
||||
enable = mkEnableOption (lib.mdDoc "k3s");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.k3s;
|
||||
defaultText = literalExpression "pkgs.k3s";
|
||||
description = lib.mdDoc "Package that should be used for k3s";
|
||||
};
|
||||
package = mkPackageOption pkgs "k3s" { };
|
||||
|
||||
role = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
|
@ -122,12 +122,7 @@ in {
|
||||
type = types.listOf (types.enum ["master" "node"]);
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
description = lib.mdDoc "Kubernetes package to use.";
|
||||
type = types.package;
|
||||
default = pkgs.kubernetes;
|
||||
defaultText = literalExpression "pkgs.kubernetes";
|
||||
};
|
||||
package = mkPackageOption pkgs "kubernetes" { };
|
||||
|
||||
kubeconfig = mkKubeConfigOptions "Default kubeconfig";
|
||||
|
||||
|
@ -9,12 +9,7 @@ in
|
||||
options.services.pacemaker = {
|
||||
enable = mkEnableOption (lib.mdDoc "pacemaker");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.pacemaker;
|
||||
defaultText = literalExpression "pkgs.pacemaker";
|
||||
description = lib.mdDoc "Package that should be used for pacemaker.";
|
||||
};
|
||||
package = mkPackageOption pkgs "pacemaker" { };
|
||||
};
|
||||
|
||||
# implementation
|
||||
|
@ -77,20 +77,18 @@ with lib;
|
||||
description = lib.mdDoc "Spark log directory.";
|
||||
default = "/var/log/spark";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = lib.mdDoc "Spark package.";
|
||||
default = pkgs.spark;
|
||||
defaultText = literalExpression "pkgs.spark";
|
||||
example = literalExpression ''pkgs.spark.overrideAttrs (super: rec {
|
||||
pname = "spark";
|
||||
version = "2.4.4";
|
||||
package = mkPackageOption pkgs "spark" {
|
||||
example = ''
|
||||
spark.overrideAttrs (super: rec {
|
||||
pname = "spark";
|
||||
version = "2.4.4";
|
||||
|
||||
src = pkgs.fetchzip {
|
||||
url = "mirror://apache/spark/"''${pname}-''${version}/''${pname}-''${version}-bin-without-hadoop.tgz";
|
||||
sha256 = "1a9w5k0207fysgpxx6db3a00fs5hdc2ncx99x4ccy2s0v5ndc66g";
|
||||
};
|
||||
})'';
|
||||
src = pkgs.fetchzip {
|
||||
url = "mirror://apache/spark/"''${pname}-''${version}/''${pname}-''${version}-bin-without-hadoop.tgz";
|
||||
sha256 = "1a9w5k0207fysgpxx6db3a00fs5hdc2ncx99x4ccy2s0v5ndc66g";
|
||||
};
|
||||
})
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -27,14 +27,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.boinc;
|
||||
defaultText = literalExpression "pkgs.boinc";
|
||||
example = literalExpression "pkgs.boinc-headless";
|
||||
description = lib.mdDoc ''
|
||||
Which BOINC package to use.
|
||||
'';
|
||||
package = mkPackageOption pkgs "boinc" {
|
||||
example = "boinc-headless";
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
|
@ -20,14 +20,7 @@ in
|
||||
options.services.foldingathome = {
|
||||
enable = mkEnableOption (lib.mdDoc "Folding@home client");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.fahclient;
|
||||
defaultText = literalExpression "pkgs.fahclient";
|
||||
description = lib.mdDoc ''
|
||||
Which Folding@home client to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "fahclient" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
|
@ -131,14 +131,10 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
package = mkPackageOption pkgs "slurm" {
|
||||
example = "slurm-full";
|
||||
} // {
|
||||
default = pkgs.slurm.override { enableX11 = ! cfg.enableSrunX11; };
|
||||
defaultText = literalExpression "pkgs.slurm";
|
||||
example = literalExpression "pkgs.slurm-full";
|
||||
description = lib.mdDoc ''
|
||||
The package to use for slurm binaries.
|
||||
'';
|
||||
};
|
||||
|
||||
controlMachine = mkOption {
|
||||
|
@ -229,12 +229,8 @@ in {
|
||||
description = lib.mdDoc "Specifies port number on which the buildbot HTTP interface listens.";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.buildbot-full;
|
||||
defaultText = literalExpression "pkgs.buildbot-full";
|
||||
description = lib.mdDoc "Package to use for buildbot.";
|
||||
example = literalExpression "pkgs.buildbot";
|
||||
package = mkPackageOption pkgs "buildbot-full" {
|
||||
example = "buildbot";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
|
@ -128,12 +128,8 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.buildbot-worker;
|
||||
defaultText = literalExpression "pkgs.python3Packages.buildbot-worker";
|
||||
description = lib.mdDoc "Package to use for buildbot worker.";
|
||||
example = literalExpression "pkgs.python2Packages.buildbot-worker";
|
||||
package = mkPackageOption pkgs "python3Packages.buildbot-worker" {
|
||||
example = "python2Packages.buildbot-worker";
|
||||
};
|
||||
|
||||
packages = mkOption {
|
||||
|
@ -161,14 +161,7 @@ with lib;
|
||||
default = {};
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = lib.mdDoc ''
|
||||
Which github-runner derivation to use.
|
||||
'';
|
||||
default = pkgs.github-runner;
|
||||
defaultText = literalExpression "pkgs.github-runner";
|
||||
};
|
||||
package = mkPackageOption pkgs "github-runner" { };
|
||||
|
||||
ephemeral = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -195,12 +195,8 @@ in {
|
||||
Time to wait until a graceful shutdown is turned into a forceful one.
|
||||
'';
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gitlab-runner;
|
||||
defaultText = literalExpression "pkgs.gitlab-runner";
|
||||
example = literalExpression "pkgs.gitlab-runner_1_11";
|
||||
description = lib.mdDoc "Gitlab Runner package to use.";
|
||||
package = mkPackageOption pkgs "gitlab-runner" {
|
||||
example = "gitlab-runner_1_11";
|
||||
};
|
||||
extraPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
|
@ -16,7 +16,7 @@ let
|
||||
mkRemovedOptionModule
|
||||
mkRenamedOptionModule
|
||||
types
|
||||
|
||||
mkPackageOption
|
||||
;
|
||||
|
||||
cfg = config.services.hercules-ci-agent;
|
||||
@ -45,14 +45,7 @@ in
|
||||
Support is available at [help@hercules-ci.com](mailto:help@hercules-ci.com).
|
||||
'';
|
||||
};
|
||||
package = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Package containing the bin/hercules-ci-agent executable.
|
||||
'';
|
||||
type = types.package;
|
||||
default = pkgs.hercules-ci-agent;
|
||||
defaultText = literalExpression "pkgs.hercules-ci-agent";
|
||||
};
|
||||
package = mkPackageOption pkgs "hercules-ci-agent" { };
|
||||
settings = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
These settings are written to the `agent.toml` file.
|
||||
|
@ -97,12 +97,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.hydra_unstable;
|
||||
defaultText = literalExpression "pkgs.hydra_unstable";
|
||||
description = lib.mdDoc "The Hydra package.";
|
||||
};
|
||||
package = mkPackageOption pkgs "hydra_unstable" { };
|
||||
|
||||
hydraURL = mkOption {
|
||||
type = types.str;
|
||||
|
@ -79,12 +79,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.jenkins;
|
||||
defaultText = literalExpression "pkgs.jenkins";
|
||||
type = types.package;
|
||||
description = lib.mdDoc "Jenkins package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "jenkins" { };
|
||||
|
||||
packages = mkOption {
|
||||
default = [ pkgs.stdenv pkgs.git pkgs.jdk17 config.programs.ssh.package pkgs.nix ];
|
||||
|
@ -47,14 +47,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
javaPackage = mkOption {
|
||||
default = pkgs.jdk;
|
||||
defaultText = literalExpression "pkgs.jdk";
|
||||
description = lib.mdDoc ''
|
||||
Java package to install.
|
||||
'';
|
||||
type = types.package;
|
||||
};
|
||||
javaPackage = mkPackageOption pkgs "jdk" { };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -41,12 +41,7 @@ in
|
||||
services.aerospike = {
|
||||
enable = mkEnableOption (lib.mdDoc "Aerospike server");
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.aerospike;
|
||||
defaultText = literalExpression "pkgs.aerospike";
|
||||
type = types.package;
|
||||
description = lib.mdDoc "Which Aerospike derivation to use";
|
||||
};
|
||||
package = mkPackageOption pkgs "aerospike" { };
|
||||
|
||||
workDir = mkOption {
|
||||
type = types.str;
|
||||
|
@ -11,6 +11,7 @@ let
|
||||
recursiveUpdate
|
||||
mdDoc
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkIf
|
||||
mkOption
|
||||
types
|
||||
@ -155,14 +156,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.cassandra;
|
||||
defaultText = literalExpression "pkgs.cassandra";
|
||||
example = literalExpression "pkgs.cassandra_3_11";
|
||||
description = mdDoc ''
|
||||
The Apache Cassandra package to use.
|
||||
'';
|
||||
package = mkPackageOption pkgs "cassandra" {
|
||||
example = "cassandra_3_11";
|
||||
};
|
||||
|
||||
jvmOpts = mkOption {
|
||||
|
@ -13,14 +13,7 @@ with lib;
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "ClickHouse database server");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.clickhouse;
|
||||
defaultText = lib.literalExpression "pkgs.clickhouse";
|
||||
description = lib.mdDoc ''
|
||||
ClickHouse package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "clickhouse" { };
|
||||
|
||||
};
|
||||
|
||||
|
@ -145,13 +145,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.cockroachdb;
|
||||
defaultText = literalExpression "pkgs.cockroachdb";
|
||||
description = lib.mdDoc ''
|
||||
The CockroachDB derivation to use for running the service.
|
||||
|
||||
package = mkPackageOption pkgs "cockroachdb" {
|
||||
extraDescription = ''
|
||||
This would primarily be useful to enable Enterprise Edition features
|
||||
in your own custom CockroachDB build (Nixpkgs CockroachDB binaries
|
||||
only contain open source features and open source code).
|
||||
|
@ -36,14 +36,7 @@ in {
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "CouchDB Server");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.couchdb3;
|
||||
defaultText = literalExpression "pkgs.couchdb3";
|
||||
description = lib.mdDoc ''
|
||||
CouchDB package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "couchdb3" { };
|
||||
|
||||
adminUser = mkOption {
|
||||
type = types.str;
|
||||
|
@ -42,13 +42,9 @@ in
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "the Firebird super server");
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.firebird;
|
||||
defaultText = literalExpression "pkgs.firebird";
|
||||
type = types.package;
|
||||
example = literalExpression "pkgs.firebird_3";
|
||||
description = lib.mdDoc ''
|
||||
Which Firebird package to be installed: `pkgs.firebird_3`
|
||||
package = mkPackageOption pkgs "firebird" {
|
||||
example = "firebird_3";
|
||||
extraDescription = ''
|
||||
For SuperServer use override: `pkgs.firebird_3.override { superServer = true; };`
|
||||
'';
|
||||
};
|
||||
|
@ -46,15 +46,7 @@ in {
|
||||
Do not use this configuration for production nor for evaluating HBase performance.
|
||||
'');
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.hbase;
|
||||
defaultText = literalExpression "pkgs.hbase";
|
||||
description = lib.mdDoc ''
|
||||
HBase package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "hbase" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
@ -116,12 +116,7 @@ in
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.influxdb;
|
||||
defaultText = literalExpression "pkgs.influxdb";
|
||||
description = lib.mdDoc "Which influxdb derivation to use";
|
||||
type = types.package;
|
||||
};
|
||||
package = mkPackageOption pkgs "influxdb" { };
|
||||
|
||||
user = mkOption {
|
||||
default = "influxdb";
|
||||
|
@ -19,6 +19,7 @@ let
|
||||
mapAttrsToList
|
||||
mdDoc
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkIf
|
||||
mkOption
|
||||
nameValuePair
|
||||
@ -278,12 +279,7 @@ in
|
||||
services.influxdb2 = {
|
||||
enable = mkEnableOption (mdDoc "the influxdb2 server");
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.influxdb2-server;
|
||||
defaultText = literalExpression "pkgs.influxdb2";
|
||||
description = mdDoc "influxdb2 derivation to use.";
|
||||
type = types.package;
|
||||
};
|
||||
package = mkPackageOption pkgs "influxdb2" { };
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
|
@ -14,12 +14,7 @@ in {
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "the MonetDB database server");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.monetdb;
|
||||
defaultText = literalExpression "pkgs.monetdb";
|
||||
description = lib.mdDoc "MonetDB package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "monetdb" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
@ -31,14 +31,7 @@ in
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "the MongoDB server");
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.mongodb;
|
||||
defaultText = literalExpression "pkgs.mongodb";
|
||||
type = types.package;
|
||||
description = lib.mdDoc ''
|
||||
Which MongoDB derivation to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "mongodb" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
@ -174,14 +174,7 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.neo4j;
|
||||
defaultText = literalExpression "pkgs.neo4j";
|
||||
description = lib.mdDoc ''
|
||||
Neo4j package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "neo4j" { };
|
||||
|
||||
readOnly = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -91,13 +91,8 @@ in {
|
||||
description = lib.mdDoc "Whether to enable the ldap server.";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.openldap;
|
||||
defaultText = literalExpression "pkgs.openldap";
|
||||
description = lib.mdDoc ''
|
||||
OpenLDAP package to use.
|
||||
|
||||
package = mkPackageOption pkgs "openldap" {
|
||||
extraDescription = ''
|
||||
This can be used to, for example, set an OpenLDAP package
|
||||
with custom overrides to enable modules or other
|
||||
functionality.
|
||||
|
@ -17,14 +17,7 @@ in {
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "OpenTSDB");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.opentsdb;
|
||||
defaultText = literalExpression "pkgs.opentsdb";
|
||||
description = lib.mdDoc ''
|
||||
OpenTSDB package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "opentsdb" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
@ -82,14 +82,7 @@ in {
|
||||
|
||||
enable = mkEnableOption (lib.mdDoc "PostgreSQL connection pooler");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.pgbouncer;
|
||||
defaultText = literalExpression "pkgs.pgbouncer";
|
||||
description = lib.mdDoc ''
|
||||
The pgbouncer package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "pgbouncer" { };
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -46,14 +46,7 @@ in {
|
||||
options.services.pgmanage = {
|
||||
enable = mkEnableOption (lib.mdDoc "PostgreSQL Administration for the web");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.pgmanage;
|
||||
defaultText = literalExpression "pkgs.pgmanage";
|
||||
description = lib.mdDoc ''
|
||||
The pgmanage package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "pgmanage" { };
|
||||
|
||||
connections = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
|
@ -53,12 +53,8 @@ in
|
||||
|
||||
enableJIT = mkEnableOption (lib.mdDoc "JIT support");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
example = literalExpression "pkgs.postgresql_15";
|
||||
description = lib.mdDoc ''
|
||||
PostgreSQL package to use.
|
||||
'';
|
||||
package = mkPackageOption pkgs "postgresql" {
|
||||
example = "postgresql_15";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
|
@ -54,12 +54,7 @@ in {
|
||||
options = {
|
||||
|
||||
services.redis = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.redis;
|
||||
defaultText = literalExpression "pkgs.redis";
|
||||
description = lib.mdDoc "Which Redis derivation to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "redis" { };
|
||||
|
||||
vmOverCommit = mkEnableOption (lib.mdDoc ''
|
||||
setting of vm.overcommit_memory to 1
|
||||
|
@ -10,14 +10,7 @@ in {
|
||||
services.surrealdb = {
|
||||
enable = mkEnableOption (lib.mdDoc "SurrealDB, a scalable, distributed, collaborative, document-graph database, for the realtime web");
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.surrealdb;
|
||||
defaultText = literalExpression "pkgs.surrealdb";
|
||||
type = types.package;
|
||||
description = lib.mdDoc ''
|
||||
Which surrealdb derivation to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "surrealdb" { };
|
||||
|
||||
dbPath = mkOption {
|
||||
type = types.str;
|
||||
|
@ -3,14 +3,7 @@ let cfg = config.services.victoriametrics; in
|
||||
{
|
||||
options.services.victoriametrics = with lib; {
|
||||
enable = mkEnableOption (lib.mdDoc "victoriametrics");
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.victoriametrics;
|
||||
defaultText = literalExpression "pkgs.victoriametrics";
|
||||
description = lib.mdDoc ''
|
||||
The VictoriaMetrics distribution to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "victoriametrics" { };
|
||||
listenAddress = mkOption {
|
||||
default = ":8428";
|
||||
type = types.str;
|
||||
|
@ -32,12 +32,7 @@ in
|
||||
enable = mkEnableOption (lib.mdDoc "GVfs, a userspace virtual filesystem");
|
||||
|
||||
# gvfs can be built with multiple configurations
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gnome.gvfs;
|
||||
defaultText = literalExpression "pkgs.gnome.gvfs";
|
||||
description = lib.mdDoc "Which GVfs package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs [ "gnome" "gvfs" ] { };
|
||||
|
||||
};
|
||||
|
||||
|
@ -25,14 +25,7 @@ in {
|
||||
services.pipewire = {
|
||||
enable = mkEnableOption (lib.mdDoc "pipewire service");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.pipewire;
|
||||
defaultText = literalExpression "pkgs.pipewire";
|
||||
description = lib.mdDoc ''
|
||||
The pipewire derivation to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "pipewire" { };
|
||||
|
||||
socketActivation = mkOption {
|
||||
default = true;
|
||||
|
@ -66,14 +66,7 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.distcc;
|
||||
defaultText = literalExpression "pkgs.distcc";
|
||||
description = lib.mdDoc ''
|
||||
The distcc package to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "distcc" { };
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
|
@ -34,17 +34,10 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
# NOTE: We don't use top-level jupyter because we don't
|
||||
# want to pass in JUPYTER_PATH but use .environment instead,
|
||||
# saving a rebuild.
|
||||
default = pkgs.python3.pkgs.notebook;
|
||||
defaultText = literalExpression "pkgs.python3.pkgs.notebook";
|
||||
description = lib.mdDoc ''
|
||||
Jupyter package to use.
|
||||
'';
|
||||
};
|
||||
# NOTE: We don't use top-level jupyter because we don't
|
||||
# want to pass in JUPYTER_PATH but use .environment instead,
|
||||
# saving a rebuild.
|
||||
package = mkPackageOption pkgs [ "python3" "pkgs" "notebook" ] { };
|
||||
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
|
@ -39,14 +39,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.rstudio-server;
|
||||
defaultText = literalExpression "pkgs.rstudio-server";
|
||||
example = literalExpression "pkgs.rstudioServerWrapper.override { packages = [ pkgs.rPackages.ggplot2 ]; }";
|
||||
description = lib.mdDoc ''
|
||||
Rstudio server package to use. Can be set to rstudioServerWrapper to provide packages.
|
||||
'';
|
||||
package = mkPackageOption pkgs "rstudio-server" {
|
||||
example = "rstudioServerWrapper.override { packages = [ pkgs.rPackages.ggplot2 ]; }";
|
||||
};
|
||||
|
||||
rserverExtraConfig = mkOption {
|
||||
|
@ -30,12 +30,7 @@ in
|
||||
services.zammad = {
|
||||
enable = mkEnableOption (lib.mdDoc "Zammad, a web-based, open source user support/ticketing solution");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.zammad;
|
||||
defaultText = literalExpression "pkgs.zammad";
|
||||
description = lib.mdDoc "Zammad package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "zammad" { };
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
|
@ -10,12 +10,7 @@ in
|
||||
options.services.greetd = {
|
||||
enable = mkEnableOption (lib.mdDoc "greetd");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.greetd.greetd;
|
||||
defaultText = literalExpression "pkgs.greetd.greetd";
|
||||
description = lib.mdDoc "The greetd package that should be used.";
|
||||
};
|
||||
package = mkPackageOption pkgs [ "greetd" "greetd" ] { };
|
||||
|
||||
settings = mkOption {
|
||||
type = settingsFormat.type;
|
||||
|
@ -63,14 +63,7 @@ in
|
||||
};
|
||||
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.emacs;
|
||||
defaultText = literalExpression "pkgs.emacs";
|
||||
description = lib.mdDoc ''
|
||||
emacs derivation to use.
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "emacs" { };
|
||||
|
||||
defaultEditor = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -8,14 +8,7 @@ in {
|
||||
options.services.infinoted = {
|
||||
enable = mkEnableOption (lib.mdDoc "infinoted");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.libinfinity;
|
||||
defaultText = literalExpression "pkgs.libinfinity";
|
||||
description = lib.mdDoc ''
|
||||
Package providing infinoted
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "libinfinity" { };
|
||||
|
||||
keyFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
|
@ -11,12 +11,7 @@ in
|
||||
services.odoo = {
|
||||
enable = mkEnableOption (lib.mdDoc "odoo");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.odoo;
|
||||
defaultText = literalExpression "pkgs.odoo";
|
||||
description = lib.mdDoc "Odoo package to use.";
|
||||
};
|
||||
package = mkPackageOption pkgs "odoo" { };
|
||||
|
||||
addons = mkOption {
|
||||
type = with types; listOf package;
|
||||
|
@ -47,12 +47,12 @@ in
|
||||
description = lib.mdDoc "Whether to start the web-ui. This is the preferred way of configuring things such as the steam guard token.";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ArchiSteamFarm.ui;
|
||||
defaultText = lib.literalExpression "pkgs.ArchiSteamFarm.ui";
|
||||
description =
|
||||
lib.mdDoc "Web-UI package to use. Contents must be in lib/dist.";
|
||||
package = mkPackageOption pkgs [ "ArchiSteamFarm" "ui" ] {
|
||||
extraDescription = ''
|
||||
::: {.note}
|
||||
Contents must be in lib/dist
|
||||
:::
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -65,12 +65,13 @@ in
|
||||
description = lib.mdDoc "The Web-UI hosted on 127.0.0.1:1242.";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ArchiSteamFarm;
|
||||
defaultText = lib.literalExpression "pkgs.ArchiSteamFarm";
|
||||
description =
|
||||
lib.mdDoc "Package to use. Should always be the latest version, for security reasons, since this module uses very new features and to not get out of sync with the Steam API.";
|
||||
package = mkPackageOption pkgs "ArchiSteamFarm" {
|
||||
extraDescription = ''
|
||||
::: {.warning}
|
||||
Should always be the latest version, for security reasons,
|
||||
since this module uses very new features and to not get out of sync with the Steam API.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
|
@ -15,13 +15,11 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.crossfire-server;
|
||||
defaultText = literalExpression "pkgs.crossfire-server";
|
||||
description = lib.mdDoc ''
|
||||
The package to use for the Crossfire server (and map/arch data, if you
|
||||
don't change dataDir).
|
||||
package = mkPackageOption pkgs "crossfire-server" {
|
||||
extraDescription = ''
|
||||
::: {.note}
|
||||
This will also be used for map/arch data, if you don't change {option}`dataDir`
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user