From 0a37316d6cfea44280f4470b6867a711a24606bd Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 27 Nov 2023 01:19:27 +0100 Subject: 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. --- nixos/modules/services/games/factorio.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'nixos/modules/services/games/factorio.nix') diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix index e6c4522d5d1d7..14bb80c2d1124 100644 --- a/nixos/modules/services/games/factorio.nix +++ b/nixos/modules/services/games/factorio.nix @@ -208,14 +208,8 @@ in This option is insecure. Use extraSettingsFile instead. ''; }; - package = mkOption { - type = types.package; - default = pkgs.factorio-headless; - defaultText = literalExpression "pkgs.factorio-headless"; - example = literalExpression "pkgs.factorio-headless-experimental"; - description = lib.mdDoc '' - Factorio version to use. This defaults to the stable channel. - ''; + package = mkPackageOption pkgs "factorio-headless" { + example = "factorio-headless-experimental"; }; password = mkOption { type = types.nullOr types.str; -- cgit 1.4.1