diff options
author | Rickard Nilsson <rickynils@gmail.com> | 2014-03-12 23:28:38 +0100 |
---|---|---|
committer | Rickard Nilsson <rickynils@gmail.com> | 2014-03-12 23:28:38 +0100 |
commit | 91e6d7411ef011a1a8ce2f1b00679afac5878120 (patch) | |
tree | 11d9a7f2a99a1ab46615b730d6a89e4a41c22368 /nixos/modules/services/web-servers/winstone.nix | |
parent | 040df9c41a7e1c2a6f9a07a5853f218318a35b67 (diff) | |
download | nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.tar nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.tar.gz nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.tar.bz2 nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.tar.lz nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.tar.xz nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.tar.zst nixlib-91e6d7411ef011a1a8ce2f1b00679afac5878120.zip |
winstone NixOS module: Make it possible to set systemd service name
Diffstat (limited to 'nixos/modules/services/web-servers/winstone.nix')
-rw-r--r-- | nixos/modules/services/web-servers/winstone.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/winstone.nix b/nixos/modules/services/web-servers/winstone.nix index 8904745ed17c..33c7e7301182 100644 --- a/nixos/modules/services/web-servers/winstone.nix +++ b/nixos/modules/services/web-servers/winstone.nix @@ -13,6 +13,14 @@ let internal = true; }; + serviceName = mkOption { + type = types.str; + description = '' + The name of the systemd service. By default, it is + derived from the winstone instance name. + ''; + }; + warFile = mkOption { type = types.str; description = '' @@ -72,6 +80,7 @@ let config = { workDir = mkDefault "/run/winstone/${name}"; + serviceName = mkDefault "winstone-${name}"; }; }; @@ -113,7 +122,7 @@ in { config = mkIf (cfg != {}) { - systemd.services = mapAttrs' (n: c: nameValuePair "winstone-${n}" (mkService c)) cfg; + systemd.services = mapAttrs' (n: c: nameValuePair c.serviceName (mkService c)) cfg; }; |