about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-25 14:28:44 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-25 15:26:36 +0200
commitbd78157485e5e3e809ab7de55f0bddf97e524336 (patch)
tree12b196e8661d4ca04ff53baa7cb6e5675bee798a
parentAdd host-specific dwmbar config (diff)
downloadnixos-config-bd78157485e5e3e809ab7de55f0bddf97e524336.tar.gz
nixos-config-bd78157485e5e3e809ab7de55f0bddf97e524336.tar.bz2
nixos-config-bd78157485e5e3e809ab7de55f0bddf97e524336.zip
Switch to systemd-boot + btrfs
-rw-r--r--hosts/configuration.nix15
-rw-r--r--hosts/phobos/hardware.nix34
2 files changed, 32 insertions, 17 deletions
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index 4c6bc89..a725990 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -8,16 +8,16 @@
     ../modules/virtualisation
   ];
 
-  # Use the GRUB 2 boot loader.
+  # Use the systemd-boot boot loader.
   boot.loader = {
-    grub = {
+    systemd-boot = {
       enable = true;
-      version = 2;
-      splashImage = null;
-      # efiSupport = true;
-      # efiInstallAsRemovable = true;
+      editor = false;
+    };
+    efi = {
+      efiSysMountPoint = "/boot";
+      canTouchEfiVariables = true;
     };
-    # efi.efiSysMountPoint = "/boot/efi";
     timeout = 0;
   };
 
@@ -87,6 +87,7 @@
     gnupg
     neovim
     steam-run
+    compsize #used to check btrfs space savings
   ];
 
   # Some programs need SUID wrappers, can be configured further or are
diff --git a/hosts/phobos/hardware.nix b/hosts/phobos/hardware.nix
index 0ed7cec..9f75e04 100644
--- a/hosts/phobos/hardware.nix
+++ b/hosts/phobos/hardware.nix
@@ -7,8 +7,7 @@ in
 
   boot = {
     initrd = {
-      availableKernelModules =
-        [ "xhci_pci" "ahci" "usbhid" "sd_mod" "sdhci_pci" ];
+      availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "sdhci_pci" ];
       kernelModules = [ ];
     };
     kernelModules = [ "kvm_intel" ];
@@ -16,14 +15,6 @@ in
     kernelParams = [ "net.ifnames=0" "biosdevname=0" "iomem=relaxed" ];
   };
 
-  fileSystems."/" = {
-    device = "/dev/disk/by-uuid/2a0ba6f5-a4ec-4614-9bd2-11b4a66d5d82";
-    fsType = "ext4";
-  };
-
-  # Define on which hard drive you want to install Grub.
-  boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only
-
   swapDevices = [ ];
 
   powerManagement.cpuFreqGovernor = powerMode;
@@ -54,4 +45,27 @@ in
     };
   };
 
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/9a450653-8369-4850-af4f-cbec7cac8a99";
+      fsType = "btrfs";
+      options = [ "subvol=root compress-force=zstd noatime" ];
+    };
+
+  fileSystems."/home" =
+    { device = "/dev/disk/by-uuid/9a450653-8369-4850-af4f-cbec7cac8a99";
+      fsType = "btrfs";
+      options = [ "subvol=home compress-force=zstd" ];
+    };
+
+  fileSystems."/nix" =
+    { device = "/dev/disk/by-uuid/9a450653-8369-4850-af4f-cbec7cac8a99";
+      fsType = "btrfs";
+      options = [ "subvol=nix compress-force=zstd noatime" ];
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/0A8B-3968";
+      fsType = "vfat";
+    };
+
 }