various: use `mkPackageOption`

h7x4 4ba3f60b 6dad8b68

+1 -6
nixos/modules/programs/kubeswitch.nix
···
description = "The name of the command to use";
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.kubeswitch;
-
defaultText = lib.literalExpression "pkgs.kubeswitch";
-
description = "The package to install for kubeswitch";
-
};
+
package = lib.mkPackageOption pkgs "kubeswitch" { };
};
};
+1 -6
nixos/modules/security/tpm2.nix
···
Trusted Platform 2 userspace resource manager daemon
'';
-
package = lib.mkOption {
-
description = "tpm2-abrmd package to use";
-
type = lib.types.package;
-
default = pkgs.tpm2-abrmd;
-
defaultText = lib.literalExpression "pkgs.tpm2-abrmd";
-
};
+
package = lib.mkPackageOption pkgs "tpm2-abrmd" { };
};
pkcs11 = {
+1 -6
nixos/modules/services/continuous-integration/buildkite-agents.nix
···
description = "Whether to enable this buildkite agent";
};
-
package = lib.mkOption {
-
default = pkgs.buildkite-agent;
-
defaultText = lib.literalExpression "pkgs.buildkite-agent";
-
description = "Which buildkite-agent derivation to use";
-
type = lib.types.package;
-
};
+
package = lib.mkPackageOption pkgs "buildkite-agent" { };
dataDir = lib.mkOption {
default = "/var/lib/buildkite-agent-${name}";
+2 -8
nixos/modules/services/databases/chromadb.nix
···
cfg = config.services.chromadb;
inherit (lib)
mkEnableOption
+
mkPackageOption
mkOption
mkIf
types
-
literalExpression
;
in
{
···
services.chromadb = {
enable = mkEnableOption "ChromaDB, an open-source AI application database.";
-
package = mkOption {
-
type = types.package;
-
example = literalExpression "pkgs.python3Packages.chromadb";
-
default = pkgs.python3Packages.chromadb;
-
defaultText = "pkgs.python3Packages.chromadb";
-
description = "ChromaDB package to use.";
-
};
+
package = mkPackageOption pkgs [ "python3Packages" "chromadb" ] { };
host = mkOption {
type = types.str;
+1 -7
nixos/modules/services/databases/ferretdb.nix
···
services.ferretdb = {
enable = lib.mkEnableOption "FerretDB, an Open Source MongoDB alternative";
-
package = lib.mkOption {
-
type = lib.types.package;
-
example = lib.literalExpression "pkgs.ferretdb";
-
default = pkgs.ferretdb;
-
defaultText = "pkgs.ferretdb";
-
description = "FerretDB package to use.";
-
};
+
package = lib.mkPackageOption pkgs "ferretdb" { };
settings = lib.mkOption {
type = lib.types.submodule {
+1 -8
nixos/modules/services/development/lorri.nix
···
issued by the `lorri` command.
'';
};
-
package = lib.mkOption {
-
default = pkgs.lorri;
-
type = lib.types.package;
-
description = ''
-
The lorri package to use.
-
'';
-
defaultText = lib.literalExpression "pkgs.lorri";
-
};
+
package = lib.mkPackageOption pkgs "lorri" { };
};
};
+1 -8
nixos/modules/services/hardware/argonone.nix
···
{
options.services.hardware.argonone = {
enable = lib.mkEnableOption "the driver for Argon One Raspberry Pi case fan and power button";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.argononed;
-
defaultText = lib.literalExpression "pkgs.argononed";
-
description = ''
-
The package implementing the Argon One driver
-
'';
-
};
+
package = lib.mkPackageOption pkgs "argononed" { };
};
config = lib.mkIf cfg.enable {
+1 -6
nixos/modules/services/hardware/sane.nix
···
'';
};
-
hardware.sane.backends-package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.sane-backends;
-
defaultText = lib.literalExpression "pkgs.sane-backends";
-
description = "Backends driver package to use.";
-
};
+
hardware.sane.backends-package = lib.mkPackageOption pkgs "sane-backends" { };
hardware.sane.snapshot = lib.mkOption {
type = lib.types.bool;
+1 -8
nixos/modules/services/matrix/mautrix-discord.nix
···
services.mautrix-discord = {
enable = lib.mkEnableOption "Mautrix-Discord, a Matrix-Discord puppeting/relay-bot bridge";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.mautrix-discord;
-
defaultText = lib.literalExpression "pkgs.mautrix-discord";
-
description = ''
-
The mautrix-discord package to use.
-
'';
-
};
+
package = lib.mkPackageOption pkgs "mautrix-discord" { };
settings = lib.mkOption {
type = lib.types.submodule {
+1 -6
nixos/modules/services/misc/etebase-server.nix
···
'';
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.etebase-server;
-
defaultText = lib.literalExpression "pkgs.python3.pkgs.etebase-server";
-
description = "etebase-server package to use.";
-
};
+
package = lib.mkPackageOption pkgs "etebase-server" { };
dataDir = lib.mkOption {
type = lib.types.str;
+1 -8
nixos/modules/services/misc/invidious-router.nix
···
for configuration options.
'';
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.invidious-router;
-
defaultText = lib.literalExpression "pkgs.invidious-router";
-
description = ''
-
The invidious-router package to use.
-
'';
-
};
+
package = lib.mkPackageOption pkgs "invidious-router" { };
nginx = {
enable = lib.mkEnableOption ''
Automatic nginx proxy configuration
+1 -6
nixos/modules/services/misc/portunus.nix
···
};
ldap = {
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.openldap;
-
defaultText = lib.literalExpression "pkgs.openldap";
-
description = "The OpenLDAP package to use.";
-
};
+
package = lib.mkPackageOption pkgs "openldap" { };
searchUserName = lib.mkOption {
type = lib.types.str;
+2 -7
nixos/modules/services/networking/ax25/axlisten.nix
···
inherit (lib.options)
mkEnableOption
mkOption
-
literalExpression
+
mkPackageOption
;
cfg = config.services.ax25.axlisten;
···
enable = mkEnableOption "AX.25 axlisten daemon";
-
package = mkOption {
-
type = types.package;
-
default = pkgs.ax25-apps;
-
defaultText = literalExpression "pkgs.ax25-apps";
-
description = "The ax25-apps package to use.";
-
};
+
package = mkPackageOption pkgs "ax25-apps" { };
config = mkOption {
type = types.str;
+1 -6
nixos/modules/services/networking/deconz.nix
···
enable = lib.mkEnableOption "deCONZ, a Zigbee gateway for use with ConBee/RaspBee hardware (https://phoscon.de/)";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.deconz;
-
defaultText = lib.literalExpression "pkgs.deconz";
-
description = "Which deCONZ package to use.";
-
};
+
package = lib.mkPackageOption pkgs "deconz" { };
device = lib.mkOption {
type = lib.types.nullOr lib.types.str;
+1 -8
nixos/modules/services/networking/firefox-syncserver.nix
···
{option}`${opt.singleNode.enable}` does this automatically when enabled
'';
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.syncstorage-rs;
-
defaultText = lib.literalExpression "pkgs.syncstorage-rs";
-
description = ''
-
Package to use.
-
'';
-
};
+
package = lib.mkPackageOption pkgs "syncstorage-rs" { };
database.name = lib.mkOption {
# the mysql module does not allow `-quoting without resorting to shell
+1 -6
nixos/modules/services/networking/mycelium.nix
···
default = false;
description = "Open the firewall for mycelium";
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.mycelium;
-
defaultText = lib.literalExpression ''"''${pkgs.mycelium}"'';
-
description = "The mycelium package to use";
-
};
+
package = lib.mkPackageOption pkgs "mycelium" { };
addHostedPublicNodes = lib.mkOption {
type = lib.types.bool;
default = true;
+1 -8
nixos/modules/services/networking/onedrive.nix
···
options.services.onedrive = {
enable = lib.mkEnableOption "OneDrive service";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.onedrive;
-
defaultText = lib.literalExpression "pkgs.onedrive";
-
description = ''
-
OneDrive package to use.
-
'';
-
};
+
package = lib.mkPackageOption pkgs "onedrive" { };
};
### Implementation
+1 -6
nixos/modules/services/networking/shorewall.nix
···
:::
'';
};
-
package = lib.mkOption {
-
type = types.package;
-
default = pkgs.shorewall;
-
defaultText = lib.literalExpression "pkgs.shorewall";
-
description = "The shorewall package to use.";
-
};
+
package = lib.mkPackageOption pkgs "shorewall" { };
configs = lib.mkOption {
type = types.attrsOf types.lines;
default = { };
+1 -6
nixos/modules/services/networking/shorewall6.nix
···
:::
'';
};
-
package = lib.mkOption {
-
type = types.package;
-
default = pkgs.shorewall;
-
defaultText = lib.literalExpression "pkgs.shorewall";
-
description = "The shorewall package to use.";
-
};
+
package = lib.mkPackageOption pkgs "shorewall" { };
configs = lib.mkOption {
type = types.attrsOf types.lines;
default = { };
+1 -6
nixos/modules/services/networking/sitespeed-io.nix
···
description = "User account under which sitespeed-io runs.";
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.sitespeed-io;
-
defaultText = "pkgs.sitespeed-io";
-
description = "Sitespeed.io package to use.";
-
};
+
package = lib.mkPackageOption pkgs "sitespeed-io" { };
dataDir = lib.mkOption {
default = "/var/lib/sitespeed-io";
+1 -8
nixos/modules/services/networking/syncplay.nix
···
'';
};
-
package = mkOption {
-
type = types.package;
-
default = pkgs.syncplay-nogui;
-
defaultText = literalExpression "pkgs.syncplay-nogui";
-
description = ''
-
Package to use for syncplay.
-
'';
-
};
+
package = mkPackageOption pkgs "syncplay-nogui" { };
};
};
+1 -8
nixos/modules/services/networking/x2goserver.nix
···
'';
};
-
package = mkOption {
-
type = types.package;
-
default = pkgs.x2goserver;
-
defaultText = literalExpression "pkgs.x2goserver";
-
description = ''
-
The x2goserver package to use.
-
'';
-
};
+
package = mkPackageOption pkgs "x2goserver" { };
superenicer = {
enable = mkEnableOption "superenicer" // {
+2 -6
nixos/modules/services/networking/zenohd.nix
···
types
mkDefault
mkOption
+
mkPackageOption
;
json = pkgs.formats.json { };
···
services.zenohd = {
enable = lib.mkEnableOption "Zenoh daemon.";
-
package = mkOption {
-
description = "The zenoh package to use.";
-
type = types.package;
-
default = pkgs.zenoh;
-
defaultText = "pkgs.zenoh";
-
};
+
package = mkPackageOption pkgs "zenoh" { };
settings = mkOption {
description = ''
+1 -6
nixos/modules/services/security/step-ca.nix
···
services.step-ca = {
enable = lib.mkEnableOption "the smallstep certificate authority server";
openFirewall = lib.mkEnableOption "opening the certificate authority server port";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.step-ca;
-
defaultText = lib.literalExpression "pkgs.step-ca";
-
description = "Which step-ca package to use.";
-
};
+
package = lib.mkPackageOption pkgs "step-ca" { };
address = lib.mkOption {
type = lib.types.str;
example = "127.0.0.1";
+1 -6
nixos/modules/services/security/tang.nix
···
options.services.tang = {
enable = lib.mkEnableOption "tang";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.tang;
-
defaultText = lib.literalExpression "pkgs.tang";
-
description = "The tang package to use.";
-
};
+
package = lib.mkPackageOption pkgs "tang" { };
listenStream = lib.mkOption {
type = with lib.types; listOf str;
+1 -6
nixos/modules/services/security/vaultwarden/default.nix
···
package = lib.mkPackageOption pkgs "vaultwarden" { };
-
webVaultPackage = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.vaultwarden.webvault;
-
defaultText = lib.literalExpression "pkgs.vaultwarden.webvault";
-
description = "Web vault package to use.";
-
};
+
webVaultPackage = lib.mkPackageOption pkgs [ "vaultwarden" "webvault" ] { };
};
config = lib.mkIf cfg.enable {
+2 -17
nixos/modules/services/web-apps/baikal.nix
···
Name of the nginx virtualhost to use and setup. If null, do not setup any virtualhost.
'';
};
-
phpPackage = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.php;
-
defaultText = "pkgs.php";
-
description = ''
-
php package to use for php fpm daemon.
-
'';
-
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.baikal;
-
defaultText = "pkgs.baikal";
-
description = ''
-
Baikal package to use.
-
'';
-
};
-
+
phpPackage = lib.mkPackageOption pkgs "php" { };
+
package = lib.mkPackageOption pkgs "baikal" { };
};
};
config = lib.mkIf cfg.enable {
+1 -6
nixos/modules/services/web-apps/castopod.nix
···
options.services = {
castopod = {
enable = lib.mkEnableOption "Castopod, a hosting platform for podcasters";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.castopod;
-
defaultText = lib.literalMD "pkgs.castopod";
-
description = "Which Castopod package to use.";
-
};
+
package = lib.mkPackageOption pkgs "castopod" { };
dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/castopod";
+1 -6
nixos/modules/services/web-apps/mastodon.nix
···
};
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.mastodon;
-
defaultText = lib.literalExpression "pkgs.mastodon";
-
description = "Mastodon package to use.";
-
};
+
package = lib.mkPackageOption pkgs "mastodon" { };
extraConfig = lib.mkOption {
type = lib.types.attrs;
+1 -6
nixos/modules/services/web-apps/nextcloud-notify_push.nix
···
options.services.nextcloud.notify_push = {
enable = lib.mkEnableOption "Notify push";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.nextcloud-notify_push;
-
defaultText = lib.literalMD "pkgs.nextcloud-notify_push";
-
description = "Which package to use for notify_push";
-
};
+
package = lib.mkPackageOption pkgs "nextcloud-notify_push" { };
socketPath = lib.mkOption {
type = lib.types.str;
+1 -6
nixos/modules/services/web-apps/nifi.nix
···
services.nifi = {
enable = lib.mkEnableOption "Apache NiFi";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.nifi;
-
defaultText = lib.literalExpression "pkgs.nifi";
-
description = "Apache NiFi package to use.";
-
};
+
package = lib.mkPackageOption pkgs "nifi" { };
user = lib.mkOption {
type = lib.types.str;
+1 -6
nixos/modules/services/web-apps/peertube.nix
···
};
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.peertube;
-
defaultText = lib.literalExpression "pkgs.peertube";
-
description = "PeerTube package to use.";
-
};
+
package = lib.mkPackageOption pkgs "peertube" { };
};
config = lib.mkIf cfg.enable {
+1 -6
nixos/modules/services/web-apps/writefreely.nix
···
options.services.writefreely = {
enable = lib.mkEnableOption "Writefreely, build a digital writing community";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.writefreely;
-
defaultText = lib.literalExpression "pkgs.writefreely";
-
description = "Writefreely package to use.";
-
};
+
package = lib.mkPackageOption pkgs "writefreely" { };
stateDir = mkOption {
type = types.path;
+1 -8
nixos/modules/services/web-apps/youtrack.nix
···
type = lib.types.str;
};
-
package = lib.mkOption {
-
description = ''
-
Package to use.
-
'';
-
type = lib.types.package;
-
default = pkgs.youtrack;
-
defaultText = lib.literalExpression "pkgs.youtrack";
-
};
+
package = lib.mkPackageOption pkgs "youtrack" { };
statePath = lib.mkOption {
description = ''
+1 -6
nixos/modules/services/web-servers/keter/default.nix
···
description = "Mutable state folder for keter";
};
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.haskellPackages.keter;
-
defaultText = lib.literalExpression "pkgs.haskellPackages.keter";
-
description = "The keter package to be used";
-
};
+
package = lib.mkPackageOption pkgs [ "haskellPackages" "keter" ] { };
globalKeterConfig = lib.mkOption {
type = lib.types.submodule {
+3 -27
nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix
···
};
theme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.gnome-themes-extra;
-
defaultText = literalExpression "pkgs.gnome-themes-extra";
-
description = ''
-
The package path that contains the theme given in the name option.
-
'';
-
};
-
+
package = mkPackageOption pkgs "gnome-themes-extra" { };
name = mkOption {
type = types.str;
default = "Adwaita";
···
};
iconTheme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.papirus-icon-theme;
-
defaultText = literalExpression "pkgs.papirus-icon-theme";
-
description = ''
-
The package path that contains the icon theme given in the name option.
-
'';
-
};
-
+
package = mkPackageOption pkgs "papirus-icon-theme" { };
name = mkOption {
type = types.str;
default = "ePapirus";
···
};
cursorTheme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.capitaine-cursors;
-
defaultText = literalExpression "pkgs.capitaine-cursors";
-
description = ''
-
The package path that contains the cursor theme given in the name option.
-
'';
-
};
-
+
package = mkPackageOption pkgs "capitaine-cursors" { };
name = mkOption {
type = types.str;
default = "capitane-cursors";
+3 -24
nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
···
theme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.gnome-themes-extra;
-
defaultText = literalExpression "pkgs.gnome-themes-extra";
-
description = ''
-
The package path that contains the theme given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "gnome-themes-extra" { };
name = mkOption {
type = types.str;
···
iconTheme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.adwaita-icon-theme;
-
defaultText = literalExpression "pkgs.adwaita-icon-theme";
-
description = ''
-
The package path that contains the icon theme given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "adwaita-icon-theme" { };
name = mkOption {
type = types.str;
···
cursorTheme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.adwaita-icon-theme;
-
defaultText = literalExpression "pkgs.adwaita-icon-theme";
-
description = ''
-
The package path that contains the cursor theme given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "adwaita-icon-theme" { };
name = mkOption {
type = types.str;
+4 -32
nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix
···
enable = mkEnableOption "lightdm-slick-greeter as the lightdm greeter";
theme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.gnome-themes-extra;
-
defaultText = literalExpression "pkgs.gnome-themes-extra";
-
description = ''
-
The package path that contains the theme given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "gnome-themes-extra" { };
name = mkOption {
type = types.str;
···
};
iconTheme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.adwaita-icon-theme;
-
defaultText = literalExpression "pkgs.adwaita-icon-theme";
-
description = ''
-
The package path that contains the icon theme given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "adwaita-icon-theme" { };
name = mkOption {
type = types.str;
···
};
font = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.ubuntu-classic;
-
defaultText = literalExpression "pkgs.ubuntu-classic";
-
description = ''
-
The package path that contains the font given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "ubuntu-classic" { };
name = mkOption {
type = types.str;
···
};
cursorTheme = {
-
package = mkOption {
-
type = types.package;
-
default = pkgs.adwaita-icon-theme;
-
defaultText = literalExpression "pkgs.adwaita-icon-theme";
-
description = ''
-
The package path that contains the cursor theme given in the name option.
-
'';
-
};
+
package = mkPackageOption pkgs "adwaita-icon-theme" { };
name = mkOption {
type = types.str;
+1 -6
nixos/modules/services/x11/window-managers/nimdow.nix
···
{
options = {
services.xserver.windowManager.nimdow.enable = mkEnableOption "nimdow";
-
services.xserver.windowManager.nimdow.package = mkOption {
-
type = types.package;
-
default = pkgs.nimdow;
-
defaultText = "pkgs.nimdow";
-
description = "nimdow package to use";
-
};
+
services.xserver.windowManager.nimdow.package = mkPackageOption pkgs "nimdow" { };
};
config = mkIf cfg.enable {
+1 -6
nixos/modules/services/x11/xscreensaver.nix
···
options.services.xscreensaver = {
enable = lib.mkEnableOption "xscreensaver user service";
-
package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.xscreensaver;
-
defaultText = lib.literalExpression "pkgs.xscreensaver";
-
description = "Which xscreensaver package to use.";
-
};
+
package = lib.mkPackageOption pkgs "xscreensaver" { };
};
config = lib.mkIf cfg.enable {
+1 -6
nixos/modules/system/boot/clevis.nix
···
options = {
boot.initrd.clevis.enable = lib.mkEnableOption "Clevis in initrd";
-
boot.initrd.clevis.package = lib.mkOption {
-
type = lib.types.package;
-
default = pkgs.clevis;
-
defaultText = "pkgs.clevis";
-
description = "Clevis package";
-
};
+
boot.initrd.clevis.package = lib.mkPackageOption pkgs "clevis" { };
boot.initrd.clevis.devices = lib.mkOption {
description = "Encrypted devices that need to be unlocked at boot using Clevis";