refactor: split systemd config into own file
This commit is contained in:
parent
db49f0461c
commit
5fed127c23
|
@ -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 = ''
|
||||
|
|
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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user