diff --git a/nixos/modules/programs/kubeswitch.nix b/nixos/modules/programs/kubeswitch.nix index 4a86f68a0d0b..0042ffb83e87 100644 --- a/nixos/modules/programs/kubeswitch.nix +++ b/nixos/modules/programs/kubeswitch.nix @@ -18,12 +18,7 @@ in 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" { }; }; }; diff --git a/nixos/modules/security/tpm2.nix b/nixos/modules/security/tpm2.nix index bb947cb32a56..dba46dbd1cf4 100644 --- a/nixos/modules/security/tpm2.nix +++ b/nixos/modules/security/tpm2.nix @@ -58,12 +58,7 @@ in 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 = { diff --git a/nixos/modules/services/continuous-integration/buildkite-agents.nix b/nixos/modules/services/continuous-integration/buildkite-agents.nix index abef4dff3ea3..f4c868ed6a2f 100644 --- a/nixos/modules/services/continuous-integration/buildkite-agents.nix +++ b/nixos/modules/services/continuous-integration/buildkite-agents.nix @@ -38,12 +38,7 @@ let 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}"; diff --git a/nixos/modules/services/databases/chromadb.nix b/nixos/modules/services/databases/chromadb.nix index 0e0188f6dd3e..03ea0221eab6 100644 --- a/nixos/modules/services/databases/chromadb.nix +++ b/nixos/modules/services/databases/chromadb.nix @@ -9,10 +9,10 @@ let cfg = config.services.chromadb; inherit (lib) mkEnableOption + mkPackageOption mkOption mkIf types - literalExpression ; in { @@ -29,13 +29,7 @@ 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; diff --git a/nixos/modules/services/databases/ferretdb.nix b/nixos/modules/services/databases/ferretdb.nix index dc756403e477..dc106bbf3b73 100644 --- a/nixos/modules/services/databases/ferretdb.nix +++ b/nixos/modules/services/databases/ferretdb.nix @@ -18,13 +18,7 @@ in 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 { diff --git a/nixos/modules/services/development/lorri.nix b/nixos/modules/services/development/lorri.nix index 899e4f3de191..efeb997d28bc 100644 --- a/nixos/modules/services/development/lorri.nix +++ b/nixos/modules/services/development/lorri.nix @@ -21,14 +21,7 @@ in 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" { }; }; }; diff --git a/nixos/modules/services/hardware/argonone.nix b/nixos/modules/services/hardware/argonone.nix index bdbe27a199c8..6c88d46fa67d 100644 --- a/nixos/modules/services/hardware/argonone.nix +++ b/nixos/modules/services/hardware/argonone.nix @@ -11,14 +11,7 @@ in { 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 { diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index 337bed562727..0b89cf2bc98a 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -67,12 +67,7 @@ in ''; }; - 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; diff --git a/nixos/modules/services/matrix/mautrix-discord.nix b/nixos/modules/services/matrix/mautrix-discord.nix index 0c37139b24c7..f14e7d90196d 100644 --- a/nixos/modules/services/matrix/mautrix-discord.nix +++ b/nixos/modules/services/matrix/mautrix-discord.nix @@ -19,14 +19,7 @@ in 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 { diff --git a/nixos/modules/services/misc/etebase-server.nix b/nixos/modules/services/misc/etebase-server.nix index f303d763d1df..ecd620cff6cc 100644 --- a/nixos/modules/services/misc/etebase-server.nix +++ b/nixos/modules/services/misc/etebase-server.nix @@ -51,12 +51,7 @@ in ''; }; - 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; diff --git a/nixos/modules/services/misc/invidious-router.nix b/nixos/modules/services/misc/invidious-router.nix index 5d4fc1528890..9a1ce086e031 100644 --- a/nixos/modules/services/misc/invidious-router.nix +++ b/nixos/modules/services/misc/invidious-router.nix @@ -70,14 +70,7 @@ in 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 diff --git a/nixos/modules/services/misc/portunus.nix b/nixos/modules/services/misc/portunus.nix index 022efc5b9839..0b0718289c8a 100644 --- a/nixos/modules/services/misc/portunus.nix +++ b/nixos/modules/services/misc/portunus.nix @@ -117,12 +117,7 @@ in }; 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; diff --git a/nixos/modules/services/networking/ax25/axlisten.nix b/nixos/modules/services/networking/ax25/axlisten.nix index ad887885c142..f36eca678eec 100644 --- a/nixos/modules/services/networking/ax25/axlisten.nix +++ b/nixos/modules/services/networking/ax25/axlisten.nix @@ -17,7 +17,7 @@ let inherit (lib.options) mkEnableOption mkOption - literalExpression + mkPackageOption ; cfg = config.services.ax25.axlisten; @@ -29,12 +29,7 @@ in 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; diff --git a/nixos/modules/services/networking/deconz.nix b/nixos/modules/services/networking/deconz.nix index c26565efcac2..fdec8923a710 100644 --- a/nixos/modules/services/networking/deconz.nix +++ b/nixos/modules/services/networking/deconz.nix @@ -21,12 +21,7 @@ in 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; diff --git a/nixos/modules/services/networking/firefox-syncserver.nix b/nixos/modules/services/networking/firefox-syncserver.nix index b13ce25a06c0..56f204c50c7c 100644 --- a/nixos/modules/services/networking/firefox-syncserver.nix +++ b/nixos/modules/services/networking/firefox-syncserver.nix @@ -101,14 +101,7 @@ in {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 diff --git a/nixos/modules/services/networking/mycelium.nix b/nixos/modules/services/networking/mycelium.nix index 7ffbf13be400..1574db67fd8a 100644 --- a/nixos/modules/services/networking/mycelium.nix +++ b/nixos/modules/services/networking/mycelium.nix @@ -39,12 +39,7 @@ in 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; diff --git a/nixos/modules/services/networking/onedrive.nix b/nixos/modules/services/networking/onedrive.nix index dae3ed31b30b..f7d1f0d0de5c 100644 --- a/nixos/modules/services/networking/onedrive.nix +++ b/nixos/modules/services/networking/onedrive.nix @@ -31,14 +31,7 @@ in 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 diff --git a/nixos/modules/services/networking/shorewall.nix b/nixos/modules/services/networking/shorewall.nix index 3d59b7d09c73..184c5fd7caf2 100644 --- a/nixos/modules/services/networking/shorewall.nix +++ b/nixos/modules/services/networking/shorewall.nix @@ -24,12 +24,7 @@ in ::: ''; }; - 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 = { }; diff --git a/nixos/modules/services/networking/shorewall6.nix b/nixos/modules/services/networking/shorewall6.nix index fe40f7e430e3..74314706c459 100644 --- a/nixos/modules/services/networking/shorewall6.nix +++ b/nixos/modules/services/networking/shorewall6.nix @@ -24,12 +24,7 @@ in ::: ''; }; - 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 = { }; diff --git a/nixos/modules/services/networking/sitespeed-io.nix b/nixos/modules/services/networking/sitespeed-io.nix index 338328dd94f0..c00a10d40d71 100644 --- a/nixos/modules/services/networking/sitespeed-io.nix +++ b/nixos/modules/services/networking/sitespeed-io.nix @@ -18,12 +18,7 @@ in 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"; diff --git a/nixos/modules/services/networking/syncplay.nix b/nixos/modules/services/networking/syncplay.nix index f2e387282e14..72b6fc3a1bc3 100644 --- a/nixos/modules/services/networking/syncplay.nix +++ b/nixos/modules/services/networking/syncplay.nix @@ -290,14 +290,7 @@ in ''; }; - 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" { }; }; }; diff --git a/nixos/modules/services/networking/x2goserver.nix b/nixos/modules/services/networking/x2goserver.nix index 8ea2c50e2bd2..52bf7b25ea5f 100644 --- a/nixos/modules/services/networking/x2goserver.nix +++ b/nixos/modules/services/networking/x2goserver.nix @@ -37,14 +37,7 @@ in ''; }; - 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" // { diff --git a/nixos/modules/services/networking/zenohd.nix b/nixos/modules/services/networking/zenohd.nix index 70eceab48792..8e86635154d3 100644 --- a/nixos/modules/services/networking/zenohd.nix +++ b/nixos/modules/services/networking/zenohd.nix @@ -10,6 +10,7 @@ let types mkDefault mkOption + mkPackageOption ; json = pkgs.formats.json { }; @@ -22,12 +23,7 @@ in 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 = '' diff --git a/nixos/modules/services/security/step-ca.nix b/nixos/modules/services/security/step-ca.nix index 3465d93f2fd0..d7ed2acf7664 100644 --- a/nixos/modules/services/security/step-ca.nix +++ b/nixos/modules/services/security/step-ca.nix @@ -15,12 +15,7 @@ in 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"; diff --git a/nixos/modules/services/security/tang.nix b/nixos/modules/services/security/tang.nix index 6bf03d107def..5efb05fd324b 100644 --- a/nixos/modules/services/security/tang.nix +++ b/nixos/modules/services/security/tang.nix @@ -11,12 +11,7 @@ in 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; diff --git a/nixos/modules/services/security/vaultwarden/default.nix b/nixos/modules/services/security/vaultwarden/default.nix index b564cd283d4e..e15f8a2eeeb1 100644 --- a/nixos/modules/services/security/vaultwarden/default.nix +++ b/nixos/modules/services/security/vaultwarden/default.nix @@ -197,12 +197,7 @@ in 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 { diff --git a/nixos/modules/services/web-apps/baikal.nix b/nixos/modules/services/web-apps/baikal.nix index 91a007e6e541..d1be94aa6204 100644 --- a/nixos/modules/services/web-apps/baikal.nix +++ b/nixos/modules/services/web-apps/baikal.nix @@ -44,23 +44,8 @@ in 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 { diff --git a/nixos/modules/services/web-apps/castopod.nix b/nixos/modules/services/web-apps/castopod.nix index 1c428cead548..1567ad1d2dc9 100644 --- a/nixos/modules/services/web-apps/castopod.nix +++ b/nixos/modules/services/web-apps/castopod.nix @@ -32,12 +32,7 @@ in 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"; diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 6cd51efbf60a..8a197c947a6e 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -706,12 +706,7 @@ in }; }; - 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; diff --git a/nixos/modules/services/web-apps/nextcloud-notify_push.nix b/nixos/modules/services/web-apps/nextcloud-notify_push.nix index 50dc65cf3b2d..ce4986b2cfa2 100644 --- a/nixos/modules/services/web-apps/nextcloud-notify_push.nix +++ b/nixos/modules/services/web-apps/nextcloud-notify_push.nix @@ -14,12 +14,7 @@ in 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; diff --git a/nixos/modules/services/web-apps/nifi.nix b/nixos/modules/services/web-apps/nifi.nix index a59e5066cf48..6e0a02cb7995 100644 --- a/nixos/modules/services/web-apps/nifi.nix +++ b/nixos/modules/services/web-apps/nifi.nix @@ -37,12 +37,7 @@ in 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; diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index 795d0947ea9e..c4213319e052 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -338,12 +338,7 @@ in }; }; - 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 { diff --git a/nixos/modules/services/web-apps/writefreely.nix b/nixos/modules/services/web-apps/writefreely.nix index ce3ea822d0ed..b2969ed1bcfa 100644 --- a/nixos/modules/services/web-apps/writefreely.nix +++ b/nixos/modules/services/web-apps/writefreely.nix @@ -152,12 +152,7 @@ in 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; diff --git a/nixos/modules/services/web-apps/youtrack.nix b/nixos/modules/services/web-apps/youtrack.nix index 1c9347ce8747..ca5fa2a8867e 100644 --- a/nixos/modules/services/web-apps/youtrack.nix +++ b/nixos/modules/services/web-apps/youtrack.nix @@ -51,14 +51,7 @@ in 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 = '' diff --git a/nixos/modules/services/web-servers/keter/default.nix b/nixos/modules/services/web-servers/keter/default.nix index 4a1b08bfd933..5dec058f661a 100644 --- a/nixos/modules/services/web-servers/keter/default.nix +++ b/nixos/modules/services/web-servers/keter/default.nix @@ -31,12 +31,7 @@ in 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 { diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix index 85de2ce62849..977042a074bd 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix @@ -38,15 +38,7 @@ in }; 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"; @@ -57,15 +49,7 @@ in }; 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"; @@ -76,15 +60,7 @@ in }; 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"; diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix index 468ab09c66a5..93726529ca47 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix @@ -49,14 +49,7 @@ in 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; @@ -70,14 +63,7 @@ in 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; @@ -91,14 +77,7 @@ in 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; diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix index e2d83ce5dcb4..edb9c2a8e740 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix @@ -36,14 +36,7 @@ in 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; @@ -55,14 +48,7 @@ in }; 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; @@ -74,14 +60,7 @@ in }; 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; @@ -93,14 +72,7 @@ in }; 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; diff --git a/nixos/modules/services/x11/window-managers/nimdow.nix b/nixos/modules/services/x11/window-managers/nimdow.nix index bde5bd950a02..68497046efcc 100644 --- a/nixos/modules/services/x11/window-managers/nimdow.nix +++ b/nixos/modules/services/x11/window-managers/nimdow.nix @@ -13,12 +13,7 @@ in { 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 { diff --git a/nixos/modules/services/x11/xscreensaver.nix b/nixos/modules/services/x11/xscreensaver.nix index 3d9312e3e6b8..b9523ef2ae53 100644 --- a/nixos/modules/services/x11/xscreensaver.nix +++ b/nixos/modules/services/x11/xscreensaver.nix @@ -12,12 +12,7 @@ in 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 { diff --git a/nixos/modules/system/boot/clevis.nix b/nixos/modules/system/boot/clevis.nix index 881a6452d9c9..afd14f492f4d 100644 --- a/nixos/modules/system/boot/clevis.nix +++ b/nixos/modules/system/boot/clevis.nix @@ -22,12 +22,7 @@ in 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";