diff options
author | sils <sils@sils.li> | 2023-01-14 16:05:45 +0100 |
---|---|---|
committer | sils <sils@sils.li> | 2023-01-14 16:11:57 +0100 |
commit | b32d3daea842e32ff44240c0f9fcc8778d1348d6 (patch) | |
tree | dca846c3a448638c1c86f61b4e149f78ef6cb901 | |
parent | Feat: Separate nix from root (diff) | |
download | nixos-server-b32d3daea842e32ff44240c0f9fcc8778d1348d6.tar.gz nixos-server-b32d3daea842e32ff44240c0f9fcc8778d1348d6.zip |
Feat: Switch to inpersistent temproot.
Having persistence as opt-in has several advantages, for instance better reproduceability.
-rw-r--r-- | hardware-configuration.nix | 15 |
1 files 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"]; }; }; } |