diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-02-01 14:50:20 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2014-02-06 16:21:19 +0100 |
commit | 616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6 (patch) | |
tree | 6bb4522ca1ff111ddf78de35cd11ba65deadaf67 /nixos/modules/system/boot/systemd.nix | |
parent | ae9c22df3f0e51ac89480b80676bcd49bd4ba2c1 (diff) | |
download | nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.tar nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.tar.gz nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.tar.bz2 nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.tar.lz nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.tar.xz nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.tar.zst nixpkgs-616b4b5b0ef8ac9bcb2ce7b577040f0b209e34b6.zip |
nixos/systemd: add journal http gateway support
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index b575deb24b7..aaa49695540 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -132,6 +132,11 @@ let ++ optionals cfg.enableEmergencyMode [ "emergency.target" "emergency.service" + ] + + ++ optionals config.services.journald.enableHttpGateway [ + "systemd-journal-gatewayd.socket" + "systemd-journal-gatewayd.service" ]; upstreamWants = @@ -372,6 +377,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 @@ -567,6 +576,14 @@ in ''; }; + services.journald.enableHttpGateway = mkOption { + default = false; + type = types.bool; + description = '' + Enable journal http gateway + ''; + }; + services.logind.extraConfig = mkOption { default = ""; type = types.lines; @@ -673,6 +690,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 = |