From a9898f7b3c71ab5b958b83e8685a790e83489726 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Tue, 29 Oct 2024 18:37:48 +0100 Subject: [PATCH] use btrfs --- mini/hardware-configuration.nix | 21 +++++++++------ share/common.nix | 48 ++++++++++++++++----------------- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/mini/hardware-configuration.nix b/mini/hardware-configuration.nix index 82a33e5..8e5e92f 100644 --- a/mini/hardware-configuration.nix +++ b/mini/hardware-configuration.nix @@ -16,13 +16,18 @@ # amd graphics hardware.graphics.extraPackages = with pkgs; [ amdvlk rocmPackages.clr.icd ]; - FIXME - # /boot efi partition to boot in UEFI mode - fileSystems."/boot" = - { device = "/dev/disk/by-id/nvme-CT4000P3PSSD8_2325E6E63746-part1"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - neededForBoot = true; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/A361-6A10"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + neededForBoot = true; + }; + + # encrypted system + boot.initrd.luks.devices."crypt-system" = { + device = "/dev/disk/by-uuid/a1d1ef39-74ea-4a6c-bc47-8ae90e002126"; + allowDiscards = true; + bypassWorkqueues = true; + }; } diff --git a/share/common.nix b/share/common.nix index e1ad170..bf1d577 100644 --- a/share/common.nix +++ b/share/common.nix @@ -17,22 +17,17 @@ in "/data/nixos/share/users.nix" ]; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It's perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? + # install release + system.stateVersion = "24.11"; # atm all stuff is x86_64 nixpkgs.hostPlatform = "x86_64-linux"; + # use the latest kernel + boot.kernelPackages = pkgs.linuxPackages_latest; + # my kernel parameters boot.kernelParams = [ - # no hibernate - "nohibernate" - # don't check for split locks, for KVM and Co. "split_lock_detect=off" ]; @@ -68,25 +63,28 @@ in }; # my data - fileSystems."/data" = - { device = "zpool/data"; - fsType = "zfs"; - neededForBoot = true; - }; + fileSystems."/data" = { + device = "/dev/mapper/crypt-system"; + fsType = "btrfs"; + options = [ "subvol=data" "noatime" ]; + neededForBoot = true; + }; # the system - fileSystems."/nix" = - { device = "zpool/nix"; - fsType = "zfs"; - neededForBoot = true; - }; + fileSystems."/nix" = { + device = "/dev/mapper/crypt-system"; + fsType = "btrfs"; + options = [ "subvol=nix" "noatime" ]; + neededForBoot = true; + }; # tmp to not fill RAM - fileSystems."/tmp" = - { device = "zpool/tmp"; - fsType = "zfs"; - neededForBoot = true; - }; + fileSystems."/tmp" = { + device = "/dev/mapper/crypt-system"; + fsType = "btrfs"; + options = [ "subvol=tmp" "noatime" ]; + neededForBoot = true; + }; # bind mount to have root home fileSystems."/root" =