From 78d717bfeff7c7a62834cec3a7854aa1033a59d6 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 29 Dec 2023 19:17:07 +0100 Subject: [PATCH 1/3] Machines/SurfaceGo: remove unused stuff --- machines/SurfaceGo/hardware-configuration.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/machines/SurfaceGo/hardware-configuration.nix b/machines/SurfaceGo/hardware-configuration.nix index e8f4999..75c5c1a 100644 --- a/machines/SurfaceGo/hardware-configuration.nix +++ b/machines/SurfaceGo/hardware-configuration.nix @@ -1,12 +1,9 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, /*modulesPath,*/ ... }: +{ config, lib, pkgs, ... }: { - /*imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ];*/ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; @@ -39,12 +36,6 @@ options = [ "subvol=@home" "compress=zstd" ]; }; - /*fileSystems."/swap" = { - device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e"; - fsType = "btrfs"; - options = [ "subvol=@swapfile" ]; - };*/ - fileSystems."/boot/efi" = { device = "/dev/disk/by-uuid/EC76-201F"; fsType = "vfat"; From af5251bf42a1ad45a0cb21c32267efe34871356c Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 29 Dec 2023 19:22:56 +0100 Subject: [PATCH 2/3] Machines/SurfaceGo: enable tpm2 --- machines/SurfaceGo/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machines/SurfaceGo/configuration.nix b/machines/SurfaceGo/configuration.nix index 1fd9518..98a7ed3 100644 --- a/machines/SurfaceGo/configuration.nix +++ b/machines/SurfaceGo/configuration.nix @@ -20,6 +20,8 @@ }; }; + security.tpm2.enable = true; + networking.hostName = "SurfaceGo"; # Define your hostname. networking.networkmanager.enable = true; # Enable networking From 44e2429b4c9ce5d8d050b2da0de8d3e28fd145b7 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 29 Dec 2023 19:23:40 +0100 Subject: [PATCH 3/3] Machines/SurfaceGo: use systemd initrd --- machines/SurfaceGo/configuration.nix | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/machines/SurfaceGo/configuration.nix b/machines/SurfaceGo/configuration.nix index 98a7ed3..1dd588b 100644 --- a/machines/SurfaceGo/configuration.nix +++ b/machines/SurfaceGo/configuration.nix @@ -5,19 +5,23 @@ { config, pkgs, lib, ... }: { - # Use grub boot loader - boot.loader = { - systemd-boot.enable = false; - grub = { - enable = true; - device = "nodev"; - efiSupport = true; - enableCryptodisk = true; - }; - efi = { - efiSysMountPoint = "/boot/efi"; - canTouchEfiVariables = true; + boot = { + loader = { + # Use grub boot loader + systemd-boot.enable = false; + grub = { + enable = true; + device = "nodev"; + efiSupport = true; + enableCryptodisk = true; + }; + efi = { + efiSysMountPoint = "/boot/efi"; + canTouchEfiVariables = true; + }; }; + # I need systemd for tpm luks unlocking + initrd.systemd.enable = true; }; security.tpm2.enable = true;