summary refs log tree commit diff
path: root/nixos/modules/system/boot
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-18 22:28:35 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-18 22:28:35 +0200
commit91ec6e0d90073b9ca3d8931261142bda12a29093 (patch)
tree3c083a5d153c7fa928505da807b61d7719f91390 /nixos/modules/system/boot
parentf32e964cc44de8b4259873be383f6ba60af4ec1e (diff)
parentaa67e95bb5845323ed1b4b9c516b6efb762fc243 (diff)
downloadnixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.tar
nixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.tar.gz
nixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.tar.bz2
nixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.tar.lz
nixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.tar.xz
nixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.tar.zst
nixlib-91ec6e0d90073b9ca3d8931261142bda12a29093.zip
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r--nixos/modules/system/boot/systemd-unit-options.nix9
-rw-r--r--nixos/modules/system/boot/systemd.nix6
2 files changed, 15 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix
index a6183c47eb1b..48c3564ba078 100644
--- a/nixos/modules/system/boot/systemd-unit-options.nix
+++ b/nixos/modules/system/boot/systemd-unit-options.nix
@@ -230,6 +230,15 @@ in rec {
       '';
     };
 
+    reload = mkOption {
+      type = types.lines;
+      default = "";
+      description = ''
+        Shell commands executed when the service's main process
+        is reloaded.
+      '';
+    };
+
     preStop = mkOption {
       type = types.lines;
       default = "";
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 366faf1b73de..13d6c6d7990a 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -246,6 +246,12 @@ let
               ${config.postStart}
             '';
           })
+        (mkIf (config.reload != "")
+          { serviceConfig.ExecReload = makeJobScript "${name}-reload" ''
+              #! ${pkgs.stdenv.shell} -e
+              ${config.reload}
+            '';
+          })
         (mkIf (config.preStop != "")
           { serviceConfig.ExecStop = makeJobScript "${name}-pre-stop" ''
               #! ${pkgs.stdenv.shell} -e