From b32d3daea842e32ff44240c0f9fcc8778d1348d6 Mon Sep 17 00:00:00 2001 From: sils Date: Sat, 14 Jan 2023 16:05:45 +0100 Subject: Feat: Switch to inpersistent temproot. Having persistence as opt-in has several advantages, for instance better reproduceability. --- hardware-configuration.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 8495607..d54f90a 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -5,14 +5,23 @@ boot.initrd.kernelModules = ["nvme" "btrfs"]; fileSystems = { "/" = { + device = "tmpfs"; + fsType = "tmpfs"; + options = ["defaults" "size=2G" "mode=755"]; + }; + "/nix" = { device = "/dev/vda3"; fsType = "btrfs"; - options = ["subvol=nixos-root"]; + options = ["subvol=nix" "compress-force=zstd"]; }; - "/nix" = { + "/srv" = { device = "/dev/vda3"; fsType = "btrfs"; - options = ["subvol=nix"]; + options = ["subvol=storage" "compress-force=zstd"]; + }; + "/etc/nixos" = { + device = "/srv/nix-config"; + options = ["bind"]; }; }; } -- cgit 1.4.1