From cb07f1b1f83996b107118c14d1986ce03c0d6216 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 29 Aug 2024 18:53:09 +0530 Subject: common: enable swap thanks for convincing me https://chrisdown.name/2018/01/02/in-defence-of-swap.html --- os/common/configuration.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'os/common') 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"; -- cgit v1.2.3