refactor: split systemd config into own file
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
./programs
|
./programs
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
|
./systemd.nix
|
||||||
./users
|
./users
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -31,20 +32,6 @@
|
|||||||
# time.timeZone = "America/Los_Angeles";
|
# time.timeZone = "America/Los_Angeles";
|
||||||
time.timeZone = "Etc/UTC"; # DST is too confusing for me => use a stable timezone
|
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 = {
|
system.activationScripts.nixClosureDiff = {
|
||||||
supportsDryActivation = true;
|
supportsDryActivation = true;
|
||||||
text = ''
|
text = ''
|
||||||
|
16
hosts/common/systemd.nix
Normal file
16
hosts/common/systemd.nix
Normal file
@@ -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
|
||||||
|
'';
|
||||||
|
}
|
Reference in New Issue
Block a user