summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-11-14 01:49:31 +0100
committermakefu <github@syntax-fehler.de>2015-11-14 01:49:31 +0100
commit2b9d7bdda10689e8bd8f7ed39830fd274c02457b (patch)
treefdd8b89a902796a9b97031dc9bbec46532bae9d3
parent78660ea002d5912eb8d06da1895cc6e34bd5e6eb (diff)
m 1 gum: add swap to server config
-rw-r--r--makefu/1systems/gum.nix1
-rw-r--r--makefu/2configs/fs/simple-swap.nix11
2 files changed, 12 insertions, 0 deletions
diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix
index 8dd347b4f..44ab8c6f8 100644
--- a/makefu/1systems/gum.nix
+++ b/makefu/1systems/gum.nix
@@ -9,6 +9,7 @@ in {
# TODO: copy this config or move to krebs
../2configs/tinc-basic-retiolum.nix
../2configs/headless.nix
+ ../2configs/fs/simple-swap.nix
../2configs/fs/single-partition-ext4.nix
# ../2configs/iodined.nix
diff --git a/makefu/2configs/fs/simple-swap.nix b/makefu/2configs/fs/simple-swap.nix
new file mode 100644
index 000000000..8c161b287
--- /dev/null
+++ b/makefu/2configs/fs/simple-swap.nix
@@ -0,0 +1,11 @@
+_:
+{
+ # do not swap that often
+ boot.kernel.sysctl = {
+ "vm.swappiness" = 25;
+ };
+
+ swapDevices = [
+ { device = "/dev/disk/by-label/swap"; }
+ ];
+}