diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 454056c0..43003fd3 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -15,6 +15,7 @@ ./programs ./secrets.nix ./ssh.nix + ./systemd.nix ./users ]; @@ -31,20 +32,6 @@ # time.timeZone = "America/Los_Angeles"; time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone - systemd.extraConfig = '' - # DefaultTimeoutStopSec defaults to 90s, and frequently blocks overall system shutdown. - # note that the values for the system manager and the user service manager must be set separately. - DefaultTimeoutStopSec=25 - ''; - - services.journald.extraConfig = '' - # docs: `man journald.conf` - # merged journald config is deployed to /etc/systemd/journald.conf - [Journal] - # disable journal compression because the underlying fs is compressed - Compress=no - ''; - system.activationScripts.nixClosureDiff = { supportsDryActivation = true; text = '' diff --git a/hosts/common/systemd.nix b/hosts/common/systemd.nix new file mode 100644 index 00000000..daad9b84 --- /dev/null +++ b/hosts/common/systemd.nix @@ -0,0 +1,16 @@ +{ ... }: +{ + systemd.extraConfig = '' + # DefaultTimeoutStopSec defaults to 90s, and frequently blocks overall system shutdown. + # note that the values for the system manager and the user service manager must be set separately. + DefaultTimeoutStopSec=25 + ''; + + services.journald.extraConfig = '' + # docs: `man journald.conf` + # merged journald config is deployed to /etc/systemd/journald.conf + [Journal] + # disable journal compression because the underlying fs is compressed + Compress=no + ''; +}