From ce6732acd8474d3c0e333f0616b4a4a5c6705968 Mon Sep 17 00:00:00 2001 From: Toast Date: Tue, 9 Apr 2024 16:07:42 +0200 Subject: [PATCH 1/2] Machines/WinMax2: add encrypted swap partition --- machines/WinMax2/hardware-configuration.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/machines/WinMax2/hardware-configuration.nix b/machines/WinMax2/hardware-configuration.nix index 45745ac..4778fbe 100755 --- a/machines/WinMax2/hardware-configuration.nix +++ b/machines/WinMax2/hardware-configuration.nix @@ -19,7 +19,10 @@ in { boot.kernelModules = ["kvm-amd"]; boot.extraModulePackages = []; - boot.initrd.luks.devices."SSD".device = "/dev/disk/by-label/wm2-enc"; + boot.initrd.luks.devices = { + "SSD".device = "/dev/disk/by-label/wm2-enc"; + "swap".device = "/dev/disk/by-label/wm2-swap"; + }; fileSystems = { "efi_boot_partition" = { @@ -65,7 +68,13 @@ in { }; }; - swapDevices = []; + swapDevices = [ + { + device = "/dev/mapper/swap"; + # only want to use the swap partition for hibernating + priority = 0; + } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware = { From 761dfedf1b61b86265f1fcda6150bb4800e070a1 Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 10 Apr 2024 13:06:55 +0200 Subject: [PATCH 2/2] Machines/WinMax2: add desktop entry to launch steam without scaling --- machines/WinMax2/configuration.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/machines/WinMax2/configuration.nix b/machines/WinMax2/configuration.nix index 79ce4d6..f5213b1 100755 --- a/machines/WinMax2/configuration.nix +++ b/machines/WinMax2/configuration.nix @@ -110,6 +110,17 @@ environment.sessionVariables = { STEAM_FORCE_DESKTOPUI_SCALING = "2"; }; + home-manager.users.toast = { + # Steam's hidpi support is bugged so it needds to be hardcoded + # This bypasses that + xdg.desktopEntries = { + steam-noScaling = { + name = "Steam (No Scaling)"; + exec = "env STEAM_FORCE_DESKTOPUI_SCALING=0 steam %U"; + icon = "steam"; + }; + }; + }; # Enable sound. # sound.enable = true;