mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-14 21:03:10 +01:00
29 lines
779 B
Nix
29 lines
779 B
Nix
{ pkgs, lib, ... }:
|
|
|
|
{
|
|
systemd = {
|
|
|
|
# package = lib.mkDefault (nixpkgs-systemd-256.legacyPackages.x86_64-linux.systemd.override { withHomed = false; });
|
|
package = lib.mkDefault (pkgs.systemd.override { withHomed = false; });
|
|
sleep.extraConfig = ''
|
|
HibernateDelaySec=2h
|
|
'';
|
|
oomd = {
|
|
enable = true;
|
|
enableSystemSlice = true;
|
|
enableRootSlice = true;
|
|
enableUserSlices = true;
|
|
};
|
|
watchdog = {
|
|
runtimeTime = "30s";
|
|
rebootTime = "10m";
|
|
};
|
|
};
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/351151#issuecomment-2440083015
|
|
# fix hosts using impermanence
|
|
boot.initrd.systemd.suppressedUnits = [ "systemd-machine-id-commit.service" ];
|
|
systemd.suppressedSystemUnits = [ "systemd-machine-id-commit.service" ];
|
|
|
|
}
|