switched to btrfs

This commit is contained in:
Rouven Seifert 2023-02-16 22:08:44 +01:00
parent 55611013b7
commit 2751a9750c
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
4 changed files with 59 additions and 49 deletions

View file

@ -15,8 +15,7 @@
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
supportedFilesystems = [ "zfs" ];
kernelPackages = pkgs.linuxPackages_latest;
};
time.timeZone = "Europe/Berlin";
@ -80,8 +79,7 @@
printing.enable = true;
fprintd.enable = true; # log in using fingerprint
openssh.enable = true; # enabled ssh to have the host keys
zfs.autoScrub.enable = true; # periodically check filesystem and repair it
zfs.trim.enable = true; # weekly ssd trimming
btrfs.autoScrub.enable = true; # periodically check filesystem and repair it
};
programs.steam.enable = true; # putting steam in here cause in home manager it doesn't work

38
hosts/thinkpad/hardware-configuration.nix Executable file → Normal file
View file

@ -13,38 +13,50 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices."luksroot" = {
device = "/dev/disk/by-uuid/6b89181c-71e0-4e84-8523-2456d3e28400";
allowDiscards = true;
};
fileSystems."/" =
{
device = "rpool/nixos/root";
fsType = "zfs";
options = [ "zfsutil" ];
device = "/dev/disk/by-uuid/3d44cde5-17a2-4023-b9ae-3a02ae68aa81";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" "discard=async" "noatime" ];
};
fileSystems."/home" =
{
device = "rpool/nixos/home";
fsType = "zfs";
options = [ "zfsutil" ];
device = "/dev/disk/by-uuid/3d44cde5-17a2-4023-b9ae-3a02ae68aa81";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" "discard=async" "noatime" ];
};
fileSystems."/var/lib" =
{
device = "rpool/nixos/var/lib";
fsType = "zfs";
options = [ "zfsutil" ];
device = "/dev/disk/by-uuid/3d44cde5-17a2-4023-b9ae-3a02ae68aa81";
fsType = "btrfs";
options = [ "subvol=lib" "compress=zstd" "discard=async" "noatime" ];
};
fileSystems."/var/log" =
{
device = "rpool/nixos/var/log";
fsType = "zfs";
options = [ "zfsutil" ];
device = "/dev/disk/by-uuid/3d44cde5-17a2-4023-b9ae-3a02ae68aa81";
fsType = "btrfs";
options = [ "subvol=log" "compress=zstd" "discard=async" "noatime" ];
};
fileSystems."/nix/store" =
{
device = "/dev/disk/by-uuid/3d44cde5-17a2-4023-b9ae-3a02ae68aa81";
fsType = "btrfs";
options = [ "subvol=store" "compress=zstd" "discard=async" "noatime" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/96DD-4C81";
device = "/dev/disk/by-uuid/B174-4DAE";
fsType = "vfat";
};