summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--os/cez/hardware-configuration.nix5
-rw-r--r--os/common/configuration.nix7
2 files changed, 11 insertions, 1 deletions
diff --git a/os/cez/hardware-configuration.nix b/os/cez/hardware-configuration.nix
index 056f65a..90a73b9 100644
--- a/os/cez/hardware-configuration.nix
+++ b/os/cez/hardware-configuration.nix
@@ -11,6 +11,11 @@
hardware.amdgpu.initrd.enable = false;
services.xserver.videoDrivers = [ "modesetting" ];
+ swapDevices = [{
+ device = "/swapfile";
+ size = 14 * 1024; # 14GB
+ }];
+
boot = {
loader.systemd-boot.enable = true;
blacklistedKernelModules = [ "k10temp" ];
diff --git a/os/common/configuration.nix b/os/common/configuration.nix
index 16f6c4d..047b153 100644
--- a/os/common/configuration.nix
+++ b/os/common/configuration.nix
@@ -1,4 +1,4 @@
-{ config, ... }: let
+{ config, lib, ... }: let
host = config.networking.hostName;
in {
disabledModules = [
@@ -18,6 +18,11 @@ in {
time.timeZone = "Asia/Kolkata";
networking.useDHCP = false;
+ swapDevices = lib.mkDefault [{
+ device = "/swapfile";
+ size = 2048; # 2GB
+ }];
+
sops = {
defaultSopsFile = ../${host}/secrets.yaml;
age.keyFile = "/var/secrets/${host}.sops";