From 421832f1f62c3c7593160089cf6e10873ad14f33 Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Thu, 7 Sep 2023 11:28:48 -0700 Subject: [PATCH 1/2] Use fork for now --- flake.lock | 11 ++++++----- flake.nix | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 9d518380..c5928e8f 100644 --- a/flake.lock +++ b/flake.lock @@ -341,15 +341,16 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1693718952, - "narHash": "sha256-+nGdJlgTk0MPN7NygopipmyylVuAVi7OItIwTlwtGnw=", - "owner": "NixOS", + "lastModified": 1694111057, + "narHash": "sha256-cgXsxHaGNnuYBflOXWDyAnrOoKcijbYWZohCsqamHag=", + "owner": "ifd3f", "repo": "nixos-hardware", - "rev": "793de77d9f83418b428e8ba70d1e42c6507d0d35", + "rev": "cfcd12a864148e53c4945fd1239419717811be96", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "ifd3f", + "ref": "remove-intel-thread-director", "repo": "nixos-hardware", "type": "github" } diff --git a/flake.nix b/flake.nix index a4b7bfee..e12450c3 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ # Specialized hardware configurations for specialized hardware. # Currently used on the Surface Pro. - nixos-hardware.url = "github:NixOS/nixos-hardware"; + nixos-hardware.url = "github:ifd3f/nixos-hardware/remove-intel-thread-director"; nixos-generators = { url = "github:nix-community/nixos-generators"; From 3fa03f15a94aafce2388e1725e40f6fc4bef53ce Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Thu, 7 Sep 2023 14:04:08 -0700 Subject: [PATCH 2/2] Let's try zfs on surface pro again... --- machines/shai-hulud/configuration.nix | 22 ++++++++++-------- machines/shai-hulud/fs.nix | 23 +++++++++++++++++++ .../shai-hulud/hardware-configuration.nix | 22 ------------------ 3 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 machines/shai-hulud/fs.nix diff --git a/machines/shai-hulud/configuration.nix b/machines/shai-hulud/configuration.nix index e155d161..d399ccf2 100644 --- a/machines/shai-hulud/configuration.nix +++ b/machines/shai-hulud/configuration.nix @@ -1,16 +1,18 @@ inputs: { config, pkgs, lib, ... }: with lib; { - imports = [ - ./hardware-configuration.nix - inputs.self.nixosModules.laptop - inputs.self.nixosModules.pc - ] ++ (with inputs.nixos-hardware.nixosModules; [ - common-cpu-intel - common-pc-ssd - microsoft-surface-common - microsoft-surface-pro-intel - ]); + imports = [ ./hardware-configuration.nix ] + ++ (with inputs.nixos-hardware.nixosModules; [ + common-cpu-intel + common-pc-ssd + microsoft-surface-common + microsoft-surface-pro-intel + ]) ++ [ + inputs.self.nixosModules.laptop + inputs.self.nixosModules.pc + + ./fs.nix + ]; microsoft-surface.kernelVersion = "6.1.18"; diff --git a/machines/shai-hulud/fs.nix b/machines/shai-hulud/fs.nix new file mode 100644 index 00000000..d321f0e9 --- /dev/null +++ b/machines/shai-hulud/fs.nix @@ -0,0 +1,23 @@ +{ + fileSystems."/" = { + device = "tank/enc/root"; + fsType = "zfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/4DC0-283F"; + fsType = "vfat"; + }; + + fileSystems."/home" = { + device = "tank/enc/home"; + fsType = "zfs"; + }; + + fileSystems."/nix" = { + device = "tank/nix"; + fsType = "zfs"; + }; + + swapDevices = [ ]; +} diff --git a/machines/shai-hulud/hardware-configuration.nix b/machines/shai-hulud/hardware-configuration.nix index 8c1f5b08..59fba0e5 100644 --- a/machines/shai-hulud/hardware-configuration.nix +++ b/machines/shai-hulud/hardware-configuration.nix @@ -12,28 +12,6 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/b1bf3fde-687c-4c9b-b1f4-d660bd062deb"; - fsType = "xfs"; - }; - - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/07b362e1-c917-40c9-8486-9a8a87857e60"; - fsType = "xfs"; - }; - - fileSystems."/home" = { - device = "/dev/disk/by-uuid/efd6ef1b-56b4-4b5c-bb6b-e263c1c988fa"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/4DC0-283F"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction