nixos-config/shared/systemd.nix

29 lines
779 B
Nix
Raw Normal View History

2024-09-10 13:12:09 +02:00
{ pkgs, lib, ... }:
2023-12-12 17:43:16 +01:00
{
systemd = {
2024-05-15 11:01:15 +02:00
# package = lib.mkDefault (nixpkgs-systemd-256.legacyPackages.x86_64-linux.systemd.override { withHomed = false; });
package = lib.mkDefault (pkgs.systemd.override { withHomed = false; });
2023-12-12 17:43:16 +01:00
sleep.extraConfig = ''
HibernateDelaySec=2h
'';
oomd = {
enable = true;
enableSystemSlice = true;
enableRootSlice = true;
2024-01-04 00:13:32 +01:00
enableUserSlices = true;
2023-12-12 17:43:16 +01:00
};
2024-03-04 20:06:38 +01:00
watchdog = {
runtimeTime = "30s";
rebootTime = "10m";
};
2023-12-12 17:43:16 +01:00
};
2024-11-08 22:42:19 +01:00
# 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" ];
2023-12-12 17:43:16 +01:00
}