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/web-apps/moodle.nix | |
parent | 9cc575741df943328b2dbbf6ef7c5dfd49c1bbe0 (diff) |
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/web-apps/moodle.nix')
-rw-r--r-- | nixos/modules/services/web-apps/moodle.nix | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/nixos/modules/services/web-apps/moodle.nix b/nixos/modules/services/web-apps/moodle.nix index 04ae6bd7f1754..ce6a800547255 100644 --- a/nixos/modules/services/web-apps/moodle.nix +++ b/nixos/modules/services/web-apps/moodle.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types; + inherit (lib) mkDefault mkEnableOption mkPackageOption mkForce mkIf mkMerge mkOption types; inherit (lib) concatStringsSep literalExpression mapAttrsToList optional optionalString; cfg = config.services.moodle; @@ -66,12 +66,7 @@ in options.services.moodle = { enable = mkEnableOption (lib.mdDoc "Moodle web application"); - package = mkOption { - type = types.package; - default = pkgs.moodle; - defaultText = literalExpression "pkgs.moodle"; - description = lib.mdDoc "The Moodle package to use."; - }; + package = mkPackageOption pkgs "moodle" { }; initialPassword = mkOption { type = types.str; |