From e6ed60548397627bf10f561f9438201dbba0a36e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 21 Apr 2024 02:15:42 +0300 Subject: 2024-04-21 --- modules/common/systemd.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 modules/common/systemd.nix (limited to 'modules/common/systemd.nix') diff --git a/modules/common/systemd.nix b/modules/common/systemd.nix new file mode 100644 index 0000000..b393d9f --- /dev/null +++ b/modules/common/systemd.nix @@ -0,0 +1,43 @@ +{ config, pkgs, ... }: +{ + ark = { + files = [ "/etc/machine-id" ]; + directories = [ "/var/lib/systemd/coredump" ]; + }; + + my.extraGroups = [ "systemd-journal" ]; + + hm.systemd.user.startServices = "sd-switch"; + + boot.initrd.systemd = { + enable = true; + network = { + inherit (config.systemd.network) enable; + wait-online.enable = false; + }; + }; + + services.journald.extraConfig = '' + SystemMaxUse=5G + ''; + + systemd = + let + extraConfig = '' + DefaultTimeoutStartSec=30s + DefaultTimeoutStopSec=15s + ''; + in + { + inherit extraConfig; + user = { + inherit extraConfig; + }; + }; + + environment.sessionVariables = { + SYSTEMD_PAGERSECURE = "1"; + SYSTEMD_PAGER = "${pkgs.less}/bin/less"; + SYSTEMD_LESS = "FRSXMK"; + }; +} -- cgit 1.4.1