diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-08-29 18:53:09 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-08-29 18:53:20 +0530 |
commit | cb07f1b1f83996b107118c14d1986ce03c0d6216 (patch) | |
tree | 2aa1fd75821dad115cc2e965ae81881491f41e90 /os/common | |
parent | 1f85635197a521329ffb7b5b37820fece5a6d9c6 (diff) |
common: enable swap
thanks for convincing me
https://chrisdown.name/2018/01/02/in-defence-of-swap.html
Diffstat (limited to 'os/common')
-rw-r--r-- | os/common/configuration.nix | 7 |
1 files changed, 6 insertions, 1 deletions
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"; |