From 26a5f320961f5c57f1797b17337f0fcc406ac50a Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 22 Jun 2019 16:16:24 -0400 Subject: [PATCH] nixos/redmine: cosmetic cleanup --- nixos/modules/services/misc/redmine.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index b0cc11e7c8b6..24b9e27ac2da 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -1,8 +1,10 @@ { config, lib, pkgs, ... }: -with lib; - let + inherit (lib) mkDefault mkEnableOption mkIf mkOption types; + inherit (lib) concatStringsSep literalExample mapAttrsToList; + inherit (lib) optional optionalAttrs optionalString singleton versionAtLeast; + cfg = config.services.redmine; bundle = "${cfg.package}/share/redmine/bin/bundle"; @@ -58,11 +60,7 @@ in { options = { services.redmine = { - enable = mkOption { - type = types.bool; - default = false; - description = "Enable the Redmine service."; - }; + enable = mkEnableOption "Redmine"; # default to the 4.x series not forcing major version upgrade of those on the 3.x series package = mkOption { @@ -110,7 +108,8 @@ in description = '' Extra configuration in configuration.yml. - See https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration + See + for details. ''; example = literalExample '' email_delivery: @@ -127,7 +126,8 @@ in description = '' Extra configuration in additional_environment.rb. - See https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example + See + for details. ''; example = literalExample '' config.logger.level = Logger::DEBUG @@ -273,8 +273,6 @@ in ]; }; - environment.systemPackages = [ cfg.package ]; - # create symlinks for the basic directory layout the redmine package expects systemd.tmpfiles.rules = [ "d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -"