about summary refs log tree commit diff
path: root/sys
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-10-01 12:02:33 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-01 12:02:33 +0000
commitc82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc (patch)
tree9f1c253dbd0577bbe0e1e0c03ad0e2b7529dab46 /sys
parent2626cfc2b162e65667ca2f1583679802c1cbbafd (diff)
downloadnixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.tar
nixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.tar.gz
nixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.tar.bz2
nixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.tar.lz
nixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.tar.xz
nixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.tar.zst
nixlib-c82bf0ecf7dc5c617ad09ef9e20dfcba1e37e9cc.zip
sys/mbp.nix: init
Diffstat (limited to 'sys')
-rw-r--r--sys/default.nix1
-rw-r--r--sys/mbp.nix91
2 files changed, 92 insertions, 0 deletions
diff --git a/sys/default.nix b/sys/default.nix
index 670b985403b6..1c5eb5c8377a 100644
--- a/sys/default.nix
+++ b/sys/default.nix
@@ -7,5 +7,6 @@ in
 {
   atuin = buildSystem ./atuin.nix;
   eve = buildSystem ./eve.nix;
+  mbp = buildSystem ./mbp.nix;
   x220 = buildSystem ./x220.nix;
 }
diff --git a/sys/mbp.nix b/sys/mbp.nix
new file mode 100644
index 000000000000..17a0e979fb5f
--- /dev/null
+++ b/sys/mbp.nix
@@ -0,0 +1,91 @@
+{ pkgs, ... }:
+
+{
+  imports = [
+    ../modules/nixos-apple-silicon/apple-silicon-support
+    ../modules/persistence
+    ../modules/workstation/audio
+    ../modules/workstation/hardware/bluetooth
+    ../modules/workstation/physical
+  ];
+
+  hardware.enableRedistributableFirmware = true;
+
+  boot.loader.systemd-boot.enable = true;
+
+  boot.initrd.postDeviceCommands = ''
+    mkdir /mnt
+    mount /dev/mapper/root /mnt
+    btrfs subvolume delete /mnt/boot
+    btrfs subvolume create /mnt/boot
+    umount /mnt
+  '';
+
+  boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/dc106480-a643-4f32-a63d-931f53e8baae";
+
+  boot.kernelPatches = [
+    # Causes gnulib tests to fail.
+    {
+      name = "revert-asahi-libwebp-hack.patch";
+      patch = pkgs.fetchpatch {
+        url = "https://github.com/AsahiLinux/linux/commit/a5e95f77e7133c7e5f9c0999fae23ebf59d645d3.patch";
+        revert = true;
+        hash = "sha256-3Vl6SzGFt1+fCvYf9Gnw9XNudiixQHcbhPSRJ14bwhc=";
+      };
+    }
+  ];
+
+  fileSystems."/" = {
+    device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926";
+    fsType = "btrfs";
+    options = [ "subvol=boot" ];
+  };
+
+  fileSystems."/home" = {
+    device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926";
+    fsType = "btrfs";
+    options = [ "subvol=persist/safe/home" ];
+  };
+
+  fileSystems."/nix" = {
+    device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926";
+    fsType = "btrfs";
+    options = [ "subvol=persist/local/nix" ];
+  };
+
+  fileSystems."/boot" = {
+    device = "/dev/disk/by-uuid/472D-1D13";
+    fsType = "vfat";
+  };
+
+  fileSystems."/persist" = {
+    device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926";
+    fsType = "btrfs";
+    options = [ "subvol=persist" ];
+    neededForBoot = true;
+  };
+
+  fileSystems."/srv" = {
+    device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926";
+    fsType = "btrfs";
+    options = [ "subvol=persist/safe/srv" ];
+  };
+
+  fileSystems."/var/lib/machines" = {
+    device = "/dev/disk/by-uuid/e5821c99-7507-421d-9280-de09a055d926";
+    fsType = "btrfs";
+    options = [ "subvol=persist/safe/var/lib/machines" ];
+  };
+
+  networking.hostName = "mbp";
+
+  users.users.qyliss.hashedPassword = "$y$j9T$qdvgrHPyvZpqjUQXuagxD1$dq5yygUTVhVqpgG9.zWaihmtED437Cl.fllqJBEWSo4";
+
+  hardware.opengl.enable = true;
+
+  programs.sway.extraConfig = ''
+    output Unknown-1 scale 2
+  '';
+
+  system.stateVersion = "23.11";
+}