journald-{remote,upload}: init

This commit is contained in:
h7x4
2026-01-15 15:39:20 +09:00
parent 5d0b2c6e0a
commit 024dae4226
4 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
{ config, lib, values, ... }:
let
cfg = config.services.journald.upload;
in
{
services.journald.upload = {
enable = lib.mkDefault true;
settings.Upload = {
URL = "https://journald.pvv.ntnu.no:${toString config.services.journald.remote.port}";
ServerKeyFile = "-";
ServerCertificateFile = "-";
TrustedCertificateFile = "-";
};
};
systemd.services."systemd-journal-upload".serviceConfig = lib.mkIf cfg.enable {
IPAddressDeny = "any";
IPAddressAllow = [
"127.0.0.1"
"::1"
values.ipv4-space
values.ipv6-space
];
};
}