summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-03-14 19:16:59 -0400
committerShea Levy <shea@shealevy.com>2014-03-14 19:16:59 -0400
commit0c12dd3ded6088febb43cd69dea531eff220d5b1 (patch)
tree9b6bdf77a32d8a31663eb208617f9ad6f2e4fc08 /nixos/modules
parent8502d84bd2363645e9910a49d290c66c51dbda51 (diff)
parent616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6 (diff)
downloadnixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.tar
nixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.tar.gz
nixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.tar.bz2
nixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.tar.lz
nixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.tar.xz
nixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.tar.zst
nixlib-0c12dd3ded6088febb43cd69dea531eff220d5b1.zip
Merge branch 'pkgs/systemd/journald_http_gateway' of git://github.com/offlinehacker/nixpkgs
systemd: python support & journal http gateway

Conflicts:
	nixos/modules/misc/ids.nix
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/misc/ids.nix2
-rw-r--r--nixos/modules/system/boot/systemd.nix19
2 files changed, 21 insertions, 0 deletions
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index 6b41c7c7c0e3..b27739c99ce0 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -118,6 +118,7 @@
       searx = 107;
       kippo = 108;
       jenkins = 109;
+      systemd-journal-gateway = 110;
 
       # When adding a uid, make sure it doesn't match an existing gid.
 
@@ -214,6 +215,7 @@
       searx = 107;
       kippo = 108;
       jenkins = 109;
+      systemd-journal-gateway = 110;
 
       # When adding a gid, make sure it doesn't match an existing uid.
 
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 7305fb17261a..49502b3e6851 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -130,6 +130,11 @@ let
     ++ optionals cfg.enableEmergencyMode [
       "emergency.target"
       "emergency.service"
+    ]
+
+    ++ optionals config.services.journald.enableHttpGateway [
+      "systemd-journal-gatewayd.socket"
+      "systemd-journal-gatewayd.service"
     ];
 
   upstreamWants =
@@ -371,6 +376,10 @@ 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
@@ -550,6 +559,14 @@ in
       '';
     };
 
+    services.journald.enableHttpGateway = mkOption {
+      default = false;
+      type = types.bool;
+      description = ''
+        Enable journal http gateway
+      '';
+    };
+
     services.logind.extraConfig = mkOption {
       default = "";
       type = types.lines;
@@ -659,6 +676,8 @@ in
       };
 
     users.extraGroups.systemd-journal.gid = config.ids.gids.systemd-journal;
+    users.extraUsers.systemd-journal-gateway.uid = config.ids.uids.systemd-journal-gateway;
+    users.extraGroups.systemd-journal-gateway.gid = config.ids.gids.systemd-journal-gateway;
 
     # Generate timer units for all services that have a ‘startAt’ value.
     systemd.timers =