diff --git a/hosts/sydpc/configuration.nix b/hosts/sydpc/configuration.nix index 2cf34b7..a688aeb 100644 --- a/hosts/sydpc/configuration.nix +++ b/hosts/sydpc/configuration.nix @@ -14,6 +14,8 @@ filesystemType = "btrfs"; tailscale.enable = true; + earlyoom.enable = true; + steam = { enable = true; impermanenceUsers = ["crumb"]; diff --git a/modules/nixos/earlyoom.nix b/modules/nixos/earlyoom.nix new file mode 100644 index 0000000..4d2ff08 --- /dev/null +++ b/modules/nixos/earlyoom.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +let cfg = config.sydnix.earlyoom; +in { + options.sydnix.earlyoom = { + enable = lib.mkEnableOption "EarlyOOM"; + }; + + config = lib.mkIf cfg.enable { + services.earlyoom = { + enable = true; + enableNotifications = true; + }; + }; +}