From cf539890e550d65f6b98b8751db542a2d6641b14 Mon Sep 17 00:00:00 2001 From: Isshi0417 Date: Thu, 4 Jul 2024 20:51:53 +0900 Subject: [PATCH] Enable swap file --- hosts/default/configuration.nix | 3 +++ modules/nixos/swap.nix | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 modules/nixos/swap.nix diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index 274639c..801cf51 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -9,6 +9,9 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix + # Swap + ../../modules/nixos/swap.nix + # NVIDIA setup ../../modules/nixos/nvidia.nix diff --git a/modules/nixos/swap.nix b/modules/nixos/swap.nix new file mode 100644 index 0000000..b09b473 --- /dev/null +++ b/modules/nixos/swap.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + swapDevices = [{ + device = "/var/lib/swapfile"; + seize = 20*1024; + }]; +} \ No newline at end of file