From e3176058d645aabe9190e184cb0a481a48e67b85 Mon Sep 17 00:00:00 2001 From: devhell Date: Tue, 25 Jun 2019 16:01:53 +0100 Subject: machines/gunnr: Switch from btrfs to zfs I've been wanting to test ZFS for a while now, and since 0.8 we have stable encryption and TRIM support for SSDs. --- machines/devhell/gunnr.nix | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'machines/devhell') diff --git a/machines/devhell/gunnr.nix b/machines/devhell/gunnr.nix index 47f63253..cf5a1fff 100644 --- a/machines/devhell/gunnr.nix +++ b/machines/devhell/gunnr.nix @@ -6,12 +6,17 @@ boot = { loader = { - timeout = 2; - systemd-boot = { + grub = { enable = true; + version = 2; + copyKernels = true; + devices = [ "/dev/sda" "/dev/sdb" ]; }; + }; - efi.canTouchEfiVariables = true; + zfs = { + enableUnstable = true; + requestEncryptionCredentials = true; }; initrd = { @@ -33,21 +38,18 @@ }; fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "btrfs"; - options = [ - "space_cache" - "compress=zstd" - "noatime" - "autodefrag" - "discard" - "ssd" - ]; + device = "zpool/root/nixos"; + fsType = "zfs"; + }; + + fileSystems."/home" = { + device = "zpool/home"; + fsType = "zfs"; }; fileSystems."/boot" = { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; + device = "/dev/disk/by-label/boot"; + fsType = "ext4"; }; zramSwap.enable = true; @@ -56,6 +58,7 @@ networking = { hostName = "gunnr"; + hostId = "29e6affc"; wireless.enable = false; useNetworkd = true; proxy = { @@ -81,6 +84,8 @@ vuizvui.user.devhell.profiles.services.enable = true; + services.zfs.autoScrub.enable = true; + services.compton = { enable = true; backend = "glx"; -- cgit 1.4.1