From 444741d758fb6e3f190429718b61784223e9a890 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Thu, 13 Jul 2023 08:13:03 +0000 Subject: [PATCH] Use btrfs for filesystems --- .../laptop/hardware-configuration.nix | 23 ++++++++++++++----- nixos-configurations/shared.nix | 6 +++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/nixos-configurations/laptop/hardware-configuration.nix b/nixos-configurations/laptop/hardware-configuration.nix index de056f7..28225ad 100644 --- a/nixos-configurations/laptop/hardware-configuration.nix +++ b/nixos-configurations/laptop/hardware-configuration.nix @@ -14,18 +14,29 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/36e29ce0-5131-43e2-a8eb-b76135491365"; - fsType = "ext4"; + { device = "/dev/disk/by-uuid/f96b81fc-fd4c-4177-84b8-3e6b789db470"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/f96b81fc-fd4c-4177-84b8-3e6b789db470"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/f96b81fc-fd4c-4177-84b8-3e6b789db470"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/B3DB-D6CA"; + { device = "/dev/disk/by-uuid/F1E9-8C98"; fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/a88b941f-c7ab-4fe0-bcf6-ac9ff6c9708b"; } - ]; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/nixos-configurations/shared.nix b/nixos-configurations/shared.nix index 661720f..9af94f6 100644 --- a/nixos-configurations/shared.nix +++ b/nixos-configurations/shared.nix @@ -18,6 +18,12 @@ isNormalUser = true; extraGroups = [ "wheel" "networkmanager" "docker" ]; }; + + fileSystems = { + "/".options = [ "compress=zstd" ]; + "/home".options = [ "compress=zstd" ]; + "/nix".options = [ "compress=zstd" "noatime" ]; + }; }