summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/misc
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r--nixos/modules/services/misc/gammu-smsd.nix10
-rw-r--r--nixos/modules/services/misc/gitlab.nix2
-rw-r--r--nixos/modules/services/misc/mbpfan.nix2
-rw-r--r--nixos/modules/services/misc/redmine.nix14
-rw-r--r--nixos/modules/services/misc/siproxd.nix2
5 files changed, 15 insertions, 15 deletions
diff --git a/nixos/modules/services/misc/gammu-smsd.nix b/nixos/modules/services/misc/gammu-smsd.nix
index 83f4efe695a2..eff725f5a868 100644
--- a/nixos/modules/services/misc/gammu-smsd.nix
+++ b/nixos/modules/services/misc/gammu-smsd.nix
@@ -10,7 +10,7 @@ let
Connection = ${cfg.device.connection}
SynchronizeTime = ${if cfg.device.synchronizeTime then "yes" else "no"}
LogFormat = ${cfg.log.format}
- ${if (cfg.device.pin != null) then "PIN = ${cfg.device.pin}" else ""}
+ ${optionalString (cfg.device.pin != null) "PIN = ${cfg.device.pin}"}
${cfg.extraConfig.gammu}
@@ -33,10 +33,10 @@ let
${optionalString (cfg.backend.service == "sql" && cfg.backend.sql.driver == "native_pgsql") (
with cfg.backend; ''
Driver = ${sql.driver}
- ${if (sql.database!= null) then "Database = ${sql.database}" else ""}
- ${if (sql.host != null) then "Host = ${sql.host}" else ""}
- ${if (sql.user != null) then "User = ${sql.user}" else ""}
- ${if (sql.password != null) then "Password = ${sql.password}" else ""}
+ ${optionalString (sql.database!= null) "Database = ${sql.database}"}
+ ${optionalString (sql.host != null) "Host = ${sql.host}"}
+ ${optionalString (sql.user != null) "User = ${sql.user}"}
+ ${optionalString (sql.password != null) "Password = ${sql.password}"}
'')}
${cfg.extraConfig.smsd}
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index d278b571a641..12c67c5f5a1e 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -1215,7 +1215,7 @@ in {
enableDelete = true; # This must be true, otherwise GitLab won't manage it correctly
extraConfig = {
auth.token = {
- realm = "http${if cfg.https == true then "s" else ""}://${cfg.host}/jwt/auth";
+ realm = "http${optionalString (cfg.https == true) "s"}://${cfg.host}/jwt/auth";
service = cfg.registry.serviceName;
issuer = cfg.registry.issuer;
rootcertbundle = cfg.registry.certFile;
diff --git a/nixos/modules/services/misc/mbpfan.nix b/nixos/modules/services/misc/mbpfan.nix
index 1a6b54854d1c..e75c35254143 100644
--- a/nixos/modules/services/misc/mbpfan.nix
+++ b/nixos/modules/services/misc/mbpfan.nix
@@ -3,7 +3,7 @@ with lib;
let
cfg = config.services.mbpfan;
- verbose = if cfg.verbose then "v" else "";
+ verbose = optionalString cfg.verbose "v";
settingsFormat = pkgs.formats.ini {};
settingsFile = settingsFormat.generate "mbpfan.ini" cfg.settings;
diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix
index 58a595b5c76f..d881ea913695 100644
--- a/nixos/modules/services/misc/redmine.nix
+++ b/nixos/modules/services/misc/redmine.nix
@@ -283,13 +283,13 @@ in
services.redmine.settings = {
production = {
- scm_subversion_command = if cfg.components.subversion then "${pkgs.subversion}/bin/svn" else "";
- scm_mercurial_command = if cfg.components.mercurial then "${pkgs.mercurial}/bin/hg" else "";
- scm_git_command = if cfg.components.git then "${pkgs.git}/bin/git" else "";
- scm_cvs_command = if cfg.components.cvs then "${pkgs.cvs}/bin/cvs" else "";
- scm_bazaar_command = if cfg.components.breezy then "${pkgs.breezy}/bin/bzr" else "";
- imagemagick_convert_command = if cfg.components.imagemagick then "${pkgs.imagemagick}/bin/convert" else "";
- gs_command = if cfg.components.ghostscript then "${pkgs.ghostscript}/bin/gs" else "";
+ scm_subversion_command = optionalString cfg.components.subversion "${pkgs.subversion}/bin/svn";
+ scm_mercurial_command = optionalString cfg.components.mercurial "${pkgs.mercurial}/bin/hg";
+ scm_git_command = optionalString cfg.components.git "${pkgs.git}/bin/git";
+ scm_cvs_command = optionalString cfg.components.cvs "${pkgs.cvs}/bin/cvs";
+ scm_bazaar_command = optionalString cfg.components.breezy "${pkgs.breezy}/bin/bzr";
+ imagemagick_convert_command = optionalString cfg.components.imagemagick "${pkgs.imagemagick}/bin/convert";
+ gs_command = optionalString cfg.components.ghostscript "${pkgs.ghostscript}/bin/gs";
minimagick_font_path = "${cfg.components.minimagick_font_path}";
};
};
diff --git a/nixos/modules/services/misc/siproxd.nix b/nixos/modules/services/misc/siproxd.nix
index f1a1ed4d29b3..99b25bdb8e9e 100644
--- a/nixos/modules/services/misc/siproxd.nix
+++ b/nixos/modules/services/misc/siproxd.nix
@@ -20,7 +20,7 @@ let
${optionalString (cfg.hostsAllowReg != []) "hosts_allow_reg = ${concatStringsSep "," cfg.hostsAllowReg}"}
${optionalString (cfg.hostsAllowSip != []) "hosts_allow_sip = ${concatStringsSep "," cfg.hostsAllowSip}"}
${optionalString (cfg.hostsDenySip != []) "hosts_deny_sip = ${concatStringsSep "," cfg.hostsDenySip}"}
- ${if (cfg.passwordFile != "") then "proxy_auth_pwfile = ${cfg.passwordFile}" else ""}
+ ${optionalString (cfg.passwordFile != "") "proxy_auth_pwfile = ${cfg.passwordFile}"}
${cfg.extraConfig}
'';