From d2f59d5995e8a415eaa20b873e366846e776d696 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 20 May 2025 20:35:47 -0700 Subject: [PATCH] bump and fix lappy gpu --- extras/dev.nix | 212 +++++++++++++++++++++---------------------- flake.lock | 45 +++++---- systems/NOlaptop.nix | 14 +++ 3 files changed, 147 insertions(+), 124 deletions(-) diff --git a/extras/dev.nix b/extras/dev.nix index d60e5d1..58306f5 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -1,118 +1,118 @@ {pkgs, ...}: { - # services.globalprotect = { - # enable = true; - # settings = { - # "vpn1.usfca.edu" = { - # openconnect-args = ""; - # }; - # }; - # }; + # services.globalprotect = { + # enable = true; + # settings = { + # "vpn1.usfca.edu" = { + # openconnect-args = ""; + # }; + # }; + # }; - environment.systemPackages = with pkgs; [ - # (llm.withPlugins (ps: with ps; [llm-openrouter])) - # bash-language-server - # digital - # etcher - # fontforge - # freecad - # llm - # lychee # link checker - # quickemu - # radicle-node - # vulkan-loader - # act - # aichat - # aider-chat - # asm-lsp - b3sum - devenv - direnv - gh - # git-cliff - hyperfine - jujutsu - just - lldb - # lua-language-server - # markdown-oxide # markdown lsp - qFlipper - qemu - sd - sshfs - taplo # toml lsp - tio - tokei # repo code stats - typos + environment.systemPackages = with pkgs; [ + # (llm.withPlugins (ps: with ps; [llm-openrouter])) + # bash-language-server + # digital + # etcher + # fontforge + # freecad + # llm + # lychee # link checker + # quickemu + # radicle-node + # vulkan-loader + # act + # aichat + # aider-chat + # asm-lsp + b3sum + devenv + direnv + gh + # git-cliff + hyperfine + jujutsu + just + lldb + # lua-language-server + # markdown-oxide # markdown lsp + qFlipper + qemu + sd + sshfs + taplo # toml lsp + tio + tokei # repo code stats + typos - # # databases - # sqlite - # sqls - # sqlx-cli - # sea-orm-cli - # rainfrog + # # databases + # sqlite + # sqls + # sqlx-cli + # sea-orm-cli + # rainfrog - # # arduino - # arduino-language-server - # arduino-cli - # pkgsCross.avr.buildPackages.gcc - # avrdude - # ravedude + # # arduino + # arduino-language-server + # arduino-cli + # pkgsCross.avr.buildPackages.gcc + # avrdude + # ravedude - # c - clang - clang-tools - gcc - gdb - gnumake + # c + clang + clang-tools + gcc + gdb + gnumake - # nix - nil - alejandra + # nix + nil + alejandra - # python - # pypy3 - python3 - # (python3.withPackages (ps: - # with ps; [ - # llm - # # llm-openrouter - # ])) - # python310Packages.python-lsp-server - uv - ruff + # python + # pypy3 + python3 + # (python3.withPackages (ps: + # with ps; [ + # llm + # # llm-openrouter + # ])) + # python310Packages.python-lsp-server + uv + ruff - # rust - cargo-binstall - bacon - cargo-expand - cargo-feature - cargo-generate - cargo-watch - elf2uf2-rs - flip-link - mdbook - mold-wrapped - probe-rs - rustup - sccache - trunk - wasm-bindgen-cli - ]; + # rust + cargo-binstall + bacon + cargo-expand + cargo-feature + cargo-generate + cargo-watch + elf2uf2-rs + flip-link + mdbook + mold-wrapped + probe-rs + rustup + sccache + trunk + wasm-bindgen-cli + ]; - hardware.flipperzero.enable = true; + hardware.flipperzero.enable = true; - services.udev.extraRules = '' - SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb" - SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" - ''; + services.udev.extraRules = '' + SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic GDB Server", SYMLINK+="ttyBmpGdb" + SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" + ''; - # virtualisation.docker = { - # enable = true; - # storageDriver = "btrfs"; - # }; - # virtualisation.docker.rootless = { - # enable = true; - # setSocketVariable = true; - # }; - # users.extraGroups.docker.members = ["tao"]; + # virtualisation.docker = { + # enable = true; + # storageDriver = "btrfs"; + # }; + # virtualisation.docker.rootless = { + # enable = true; + # setSocketVariable = true; + # }; + # users.extraGroups.docker.members = ["tao"]; } diff --git a/flake.lock b/flake.lock index 6e1f740..9190f9a 100644 --- a/flake.lock +++ b/flake.lock @@ -9,6 +9,7 @@ }, "locked": { "lastModified": 1747575206, + "narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", "owner": "ryantm", "repo": "agenix", "rev": "4835b1dc898959d8547a871ef484930675cb47f1", @@ -88,10 +89,11 @@ ] }, "locked": { - "lastModified": 1747621015, + "lastModified": 1747742835, + "narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", "owner": "nix-community", "repo": "disko", - "rev": "cec44d77d9dacf0c91d3d51aff128fefabce06ee", + "rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", "type": "github" }, "original": { @@ -214,10 +216,11 @@ ] }, "locked": { - "lastModified": 1747688838, + "lastModified": 1747834438, + "narHash": "sha256-AHJt79W8wADzur2htCx1U8FtEk4XjvrHb9/3iDfNedI=", "owner": "nix-community", "repo": "home-manager", - "rev": "45c2985644b60ab64de2a2d93a4d132ecb87cf66", + "rev": "6c2eb1e24cd0e76d88bdd633ef4c50d6286586e0", "type": "github" }, "original": { @@ -271,6 +274,7 @@ "nixos": { "locked": { "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", "owner": "NixOS", "repo": "nixpkgs", "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", @@ -293,10 +297,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1747652941, + "lastModified": 1747826251, + "narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "db6a8028fd470863b3121621944ecdc81ee3ad2a", + "rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a", "type": "github" }, "original": { @@ -308,6 +313,7 @@ "nixos-facter-modules": { "locked": { "lastModified": 1743671943, + "narHash": "sha256-7sYig0+RcrR3sOL5M+2spbpFUHyEP7cnUvCaqFOBjyU=", "owner": "numtide", "repo": "nixos-facter-modules", "rev": "58ad9691670d293a15221d4a78818e0088d2e086", @@ -321,10 +327,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1747684167, + "lastModified": 1747860404, + "narHash": "sha256-9IMwxC4g1AyhOHTx8iTimoKnyzl9Rk2OJZiDtFoF3pA=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e8f38b2c19c0647e39021c3d47172ff5469af8a9", + "rev": "2b9118883d29290a1b16ae3a12aedc478dae2546", "type": "github" }, "original": { @@ -384,11 +391,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1747485343, - "narHash": "sha256-YbsZyuRE1tobO9sv0PUwg81QryYo3L1F3R3rF9bcG38=", + "lastModified": 1747676747, + "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b5ac7ad45298d58640540d0323ca217f32a6762", + "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", "type": "github" }, "original": { @@ -430,10 +437,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1747542820, + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -465,11 +473,11 @@ ] }, "locked": { - "lastModified": 1747622321, - "narHash": "sha256-W0dYIWgsUu6rvOJRtKLhKskkv0VhQhJYGNIq+gGUc8g=", + "lastModified": 1747795013, + "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "bd030fd9983f7fddf87be1c64aa3064c8afa24c4", + "rev": "6b1cf12374361859242a562e1933a7930649131a", "type": "github" }, "original": { @@ -501,10 +509,11 @@ ] }, "locked": { - "lastModified": 1747710747, + "lastModified": 1747862287, + "narHash": "sha256-ys4f+C9kfLMV6uRHqKscok3OCEPduNE2wPko5hMr3to=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "281cda71fda95e9dc5e0eb0887d4e53e894ca037", + "rev": "6cf000b8a04cba6592cc96f2127ce7666f14c243", "type": "github" }, "original": { diff --git a/systems/NOlaptop.nix b/systems/NOlaptop.nix index d9137fa..f2cc496 100644 --- a/systems/NOlaptop.nix +++ b/systems/NOlaptop.nix @@ -4,6 +4,16 @@ pkgs, ... }: { + hardware.opengl.extraPackages = with pkgs; [ + amdvlk + ]; + hardware.opengl.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk + ]; + services.xserver.videoDrivers = [ + "amdgpu" + ]; + # services.pipewire.wireplumber.extraConfig = { # "wireplumber.settings" = { # "device.routes.default-source-volume" = 0.42; @@ -46,8 +56,11 @@ fw-ectool framework-tool nvtopPackages.amd + lact ]; + systemd.services.lactd.wantedBy = ["multi-user.target"]; + services.fwupd.enable = true; services.tailscale.useRoutingFeatures = "client"; systemd.services."backlight@backlight:amdgpu_bl2".enable = false; @@ -100,6 +113,7 @@ # "mem_sleep_default=deep" ]; # boot.kernelModules = ["kvm-amd"]; + boot.kernelModules = ["amdgpu"]; powerManagement.cpuFreqGovernor = "powersave"; systemd.sleep.extraConfig = "HibernateDelaySec=360m";