diff options
author | h7x4 <h7x4@nani.wtf> | 2023-11-27 01:19:27 +0100 |
---|---|---|
committer | h7x4 <h7x4@nani.wtf> | 2023-11-27 01:28:36 +0100 |
commit | 0a37316d6cfea44280f4470b6867a711a24606bd (patch) | |
tree | 0dce949073e1f1647975a2ec3adfb7facdbb8ac4 /nixos/modules/services/torrent | |
parent | 9cc575741df943328b2dbbf6ef7c5dfd49c1bbe0 (diff) | |
download | nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.tar nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.tar.gz nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.tar.bz2 nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.tar.lz nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.tar.xz nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.tar.zst nixlib-0a37316d6cfea44280f4470b6867a711a24606bd.zip |
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.
Diffstat (limited to 'nixos/modules/services/torrent')
-rw-r--r-- | nixos/modules/services/torrent/deluge.nix | 8 | ||||
-rw-r--r-- | nixos/modules/services/torrent/opentracker.nix | 9 | ||||
-rw-r--r-- | nixos/modules/services/torrent/rtorrent.nix | 9 |
3 files changed, 3 insertions, 23 deletions
diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix index 003f7b2613b7..4802e3e1c63a 100644 --- a/nixos/modules/services/torrent/deluge.nix +++ b/nixos/modules/services/torrent/deluge.nix @@ -147,13 +147,7 @@ in { ''; }; - package = mkOption { - type = types.package; - example = literalExpression "pkgs.deluge-2_x"; - description = lib.mdDoc '' - Deluge package to use. - ''; - }; + package = mkPackageOption pkgs "deluge-2_x" { }; }; deluge.web = { diff --git a/nixos/modules/services/torrent/opentracker.nix b/nixos/modules/services/torrent/opentracker.nix index 7d67491c1191..71852f24e55b 100644 --- a/nixos/modules/services/torrent/opentracker.nix +++ b/nixos/modules/services/torrent/opentracker.nix @@ -7,14 +7,7 @@ in { options.services.opentracker = { enable = mkEnableOption (lib.mdDoc "opentracker"); - package = mkOption { - type = types.package; - description = lib.mdDoc '' - opentracker package to use - ''; - default = pkgs.opentracker; - defaultText = literalExpression "pkgs.opentracker"; - }; + package = mkPackageOption pkgs "opentracker" { }; extraOptions = mkOption { type = types.separatedString " "; diff --git a/nixos/modules/services/torrent/rtorrent.nix b/nixos/modules/services/torrent/rtorrent.nix index 64cda7fb675f..699f3be82a9d 100644 --- a/nixos/modules/services/torrent/rtorrent.nix +++ b/nixos/modules/services/torrent/rtorrent.nix @@ -53,14 +53,7 @@ in { ''; }; - package = mkOption { - type = types.package; - default = pkgs.rtorrent; - defaultText = literalExpression "pkgs.rtorrent"; - description = lib.mdDoc '' - The rtorrent package to use. - ''; - }; + package = mkPackageOption pkgs "rtorrent" { }; port = mkOption { type = types.port; |