about summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-17 19:05:29 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-17 19:05:29 +0200
commit2ad6933a22fd0f834f4abf1766f56c797c26991c (patch)
tree667a41956f0369cfd0c51a54c9de57723a560e62 /nixos/modules/system
parent179acfb664ed06519ac515eada7bbef677cbee87 (diff)
downloadnixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.tar
nixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.tar.gz
nixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.tar.bz2
nixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.tar.lz
nixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.tar.xz
nixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.tar.zst
nixlib-2ad6933a22fd0f834f4abf1766f56c797c26991c.zip
Remove special handling of systemd-journal-gatewayd
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/systemd.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index ee809a8ec44e..d37cb80748d2 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -79,6 +79,8 @@ let
       "systemd-journald.socket"
       "systemd-journald.service"
       "systemd-journal-flush.service"
+      "systemd-journal-gatewayd.socket"
+      "systemd-journal-gatewayd.service"
       "syslog.socket"
 
       # SysV init compatibility.
@@ -161,11 +163,6 @@ let
     ++ optionals cfg.enableEmergencyMode [
       "emergency.target"
       "emergency.service"
-    ]
-
-    ++ optionals config.services.journald.enableHttpGateway [
-      "systemd-journal-gatewayd.socket"
-      "systemd-journal-gatewayd.service"
     ];
 
   upstreamWants =
@@ -438,10 +435,6 @@ let
 
       ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \
             ../nss-user-lookup.target ../swap.target $out/multi-user.target.wants/
-
-      ${ optionalString config.services.journald.enableHttpGateway ''
-        ln -s ../systemd-journal-gatewayd.service $out/multi-user-target.wants/
-      ''}
     ''; # */
 
 in
@@ -632,7 +625,7 @@ in
       default = false;
       type = types.bool;
       description = ''
-        Enable journal http gateway
+        Whether to enable the HTTP gateway to the journal.
       '';
     };
 
@@ -779,6 +772,9 @@ in
         })
         (filterAttrs (name: service: service.startAt != "") cfg.services);
 
+    systemd.sockets.systemd-journal-gatewayd.wantedBy =
+      optional config.services.journald.enableHttpGateway "sockets.target";
+
     # Provide the systemd-user PAM service, required to run systemd
     # user instances.
     security.pam.services.systemd-user =