From b954abe8be750a9ae2c56ee71e1af056b0cb0a4f Mon Sep 17 00:00:00 2001 From: NullBite Date: Fri, 21 Jun 2024 01:21:11 -0400 Subject: [PATCH] rpi4: update btrfs config --- hosts/rpi4/configuration.nix | 5 +++++ hosts/rpi4/hardware-configuration.nix | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/hosts/rpi4/configuration.nix b/hosts/rpi4/configuration.nix index 1d5a585..db4c976 100644 --- a/hosts/rpi4/configuration.nix +++ b/hosts/rpi4/configuration.nix @@ -10,6 +10,11 @@ ./hardware-configuration.nix ]; + fileSystems = let + mounts = [ "/nix" "/" "/.btrfsroot" "/home" ]; + fn = (x: { options = [ "compress=zstd" ];}); + in lib.genAttrs mounts fn; + # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) boot.loader.grub.enable = false; # Enables the generation of /boot/extlinux/extlinux.conf diff --git a/hosts/rpi4/hardware-configuration.nix b/hosts/rpi4/hardware-configuration.nix index 8aaa767..0a5949b 100644 --- a/hosts/rpi4/hardware-configuration.nix +++ b/hosts/rpi4/hardware-configuration.nix @@ -13,6 +13,12 @@ boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; + fileSystems."/.btrfsroot" = + { device = "/dev/disk/by-uuid/112535b6-4318-4d26-812b-7baf0d65dae5"; + fsType = "btrfs"; + options = [ "subvol=/" ]; + }; + fileSystems."/" = { device = "/dev/disk/by-uuid/112535b6-4318-4d26-812b-7baf0d65dae5"; fsType = "btrfs";