nixos/redmine: cosmetic cleanup

This commit is contained in:
Aaron Andersen 2019-06-22 16:16:24 -04:00
parent e702468f6b
commit 26a5f32096

View File

@ -1,8 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
inherit (lib) mkDefault mkEnableOption mkIf mkOption types;
inherit (lib) concatStringsSep literalExample mapAttrsToList;
inherit (lib) optional optionalAttrs optionalString singleton versionAtLeast;
cfg = config.services.redmine; cfg = config.services.redmine;
bundle = "${cfg.package}/share/redmine/bin/bundle"; bundle = "${cfg.package}/share/redmine/bin/bundle";
@ -58,11 +60,7 @@ in
{ {
options = { options = {
services.redmine = { services.redmine = {
enable = mkOption { enable = mkEnableOption "Redmine";
type = types.bool;
default = false;
description = "Enable the Redmine service.";
};
# default to the 4.x series not forcing major version upgrade of those on the 3.x series # default to the 4.x series not forcing major version upgrade of those on the 3.x series
package = mkOption { package = mkOption {
@ -110,7 +108,8 @@ in
description = '' description = ''
Extra configuration in configuration.yml. Extra configuration in configuration.yml.
See https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration See <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
for details.
''; '';
example = literalExample '' example = literalExample ''
email_delivery: email_delivery:
@ -127,7 +126,8 @@ in
description = '' description = ''
Extra configuration in additional_environment.rb. Extra configuration in additional_environment.rb.
See https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example See <link xlink:href="https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example"/>
for details.
''; '';
example = literalExample '' example = literalExample ''
config.logger.level = Logger::DEBUG 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 # create symlinks for the basic directory layout the redmine package expects
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -" "d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -"