diff options
author | devhell <devhell@mailfresser.de> | 2019-06-25 16:01:53 +0100 |
---|---|---|
committer | devhell <devhell@mailfresser.de> | 2019-06-25 16:01:53 +0100 |
commit | e3176058d645aabe9190e184cb0a481a48e67b85 (patch) | |
tree | 3abef24af9da03981422a0f004d62e115236b56c /machines | |
parent | cfb2711b43d3ca042be423ded07baa1cd3bd87a0 (diff) |
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.
Diffstat (limited to 'machines')
-rw-r--r-- | machines/devhell/gunnr.nix | 35 |
1 files changed, 20 insertions, 15 deletions
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"; |