From 231034ac69724e18828ba1aa546ae5bb818d77a9 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:51:26 -0800 Subject: [PATCH] amd bug workaround --- systems/NOlaptop.nix | 1 + users/tao.nix | 2 +- users/tao/nushell/stuff.nu | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/systems/NOlaptop.nix b/systems/NOlaptop.nix index 41d7560..c5e4da9 100644 --- a/systems/NOlaptop.nix +++ b/systems/NOlaptop.nix @@ -73,6 +73,7 @@ # ]; boot.kernelParams = [ "amdgpu.abmlevel=1" + "amdgpu.dcdebugmask=0x400" ]; # boot.kernelModules = ["kvm-amd"]; powerManagement.cpuFreqGovernor = "powersave"; diff --git a/users/tao.nix b/users/tao.nix index b495147..2723bac 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -102,7 +102,7 @@ SUBVOLUME = "/home"; # FSTYPE = "bcachefs"; FSTYPE = - if lib.nixosSystem == "NOlaptop" + if lib.strings.hasPrefix "NOlaptop" (builtins.readFile /etc/hostname) then "bcachefs" else "btrfs"; ALLOW_USERS = ["tao"]; diff --git a/users/tao/nushell/stuff.nu b/users/tao/nushell/stuff.nu index ff83055..523c1b3 100644 --- a/users/tao/nushell/stuff.nu +++ b/users/tao/nushell/stuff.nu @@ -69,7 +69,7 @@ def nr [package] { nix search nixpkgs $package } def rebuild --wrapped [subcommand, ...rest] { - if ((open /etc/hostname --raw) == "NOlaptop\n") { + if ((open /etc/hostname --raw) == "NOlaptop\n" and not ($rest | first | str starts-with "--builders")) { sudo nix store info --store ssh://nocomputer } sudo nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose ...$rest