From 5020f2dcc6167b4523ae2893294d9544ddaa55f4 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Tue, 3 Sep 2024 13:38:04 -0300 Subject: [PATCH 1/4] Fix nvidia GPU issues on azrael --- flake.lock | 66 ++++++++++++++++---------------- home-manager/traverseda/home.nix | 11 ++++++ nixos/hardware/azrael.nix | 9 +++-- 3 files changed, 50 insertions(+), 36 deletions(-) diff --git a/flake.lock b/flake.lock index bf0a7e0..001e6be 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1722339003, - "narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=", + "lastModified": 1723293904, + "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", "owner": "ryantm", "repo": "agenix", - "rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7", + "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", "type": "github" }, "original": { @@ -163,11 +163,11 @@ ] }, "locked": { - "lastModified": 1722857853, - "narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=", + "lastModified": 1724857454, + "narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da", + "rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6", "type": "github" }, "original": { @@ -226,11 +226,11 @@ ] }, "locked": { - "lastModified": 1723015306, - "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -288,11 +288,11 @@ ] }, "locked": { - "lastModified": 1722924007, - "narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=", + "lastModified": 1724561770, + "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "91010a5613ffd7ee23ee9263213157a1c422b705", + "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e", "type": "github" }, "original": { @@ -308,11 +308,11 @@ ] }, "locked": { - "lastModified": 1722740924, - "narHash": "sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss=", + "lastModified": 1724576102, + "narHash": "sha256-uM7n5nNL6fmA0bwMJBNll11f4cMWOFa2Ni6F5KeIldM=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "97ca0a0fca0391de835f57e44f369a283e37890f", + "rev": "e333d62b70b179da1dd78d94315e8a390f2d12e5", "type": "github" }, "original": { @@ -354,11 +354,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1722813957, - "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", + "lastModified": 1724819573, + "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", + "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "type": "github" }, "original": { @@ -370,11 +370,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1722869614, - "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", + "lastModified": 1724727824, + "narHash": "sha256-0XH9MJk54imJm+RHOLTUJ7e+ponLW00tw5ke4MTVa1Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", + "rev": "36bae45077667aff5720e5b3f1a5458f51cf0776", "type": "github" }, "original": { @@ -398,11 +398,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1722925293, - "narHash": "sha256-saXm5dd/e3PMsYTEcp1Qbzifm3KsZtNFkrWjmLhXHGE=", + "lastModified": 1724910205, + "narHash": "sha256-eH2yPsTkaGp87rtxATx9d2dGBQUXH3kQPEOTKmaEb0s=", "owner": "nix-community", "repo": "nixvim", - "rev": "170df9814c3e41d5a4d6e3339e611801b1f02ce2", + "rev": "d150ce320e4eda99d8865bbd4c74ee8c47a88097", "type": "github" }, "original": { @@ -422,11 +422,11 @@ ] }, "locked": { - "lastModified": 1723036961, - "narHash": "sha256-GLrZ8CE2FlWbeJFFcO+J5nphbOG8d0eslpy8Uv+AHoY=", + "lastModified": 1724556439, + "narHash": "sha256-gPR3sxkKxISUvydnqoj54znpUkK8av/HVFuFJuYUw3w=", "owner": "pjones", "repo": "plasma-manager", - "rev": "b6e7a2ed7b22effe1395416adf527935c4b3dc9b", + "rev": "5c97fe8af2a2e561f14195ed357d8c451fdbff4c", "type": "github" }, "original": { @@ -456,11 +456,11 @@ ] }, "locked": { - "lastModified": 1723032080, - "narHash": "sha256-Um/O5KEPUuWjJOxknWT76RO6PBgeBT/A2fS+e9Kz1pA=", + "lastModified": 1724117129, + "narHash": "sha256-syYDeNi50lYGaSajggdgcLbV8P/E3v77F2fF5vTuCoI=", "owner": "lopsided98", "repo": "nix-ros-overlay", - "rev": "69219f8f35e5ae08e4ccff256529355744bc06ba", + "rev": "1992646cf65ac8f036a21a2005e10c4454c9e3fc", "type": "github" }, "original": { @@ -507,11 +507,11 @@ ] }, "locked": { - "lastModified": 1722330636, - "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=", + "lastModified": 1724833132, + "narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "768acdb06968e53aa1ee8de207fd955335c754b7", + "rev": "3ffd842a5f50f435d3e603312eefa4790db46af5", "type": "github" }, "original": { diff --git a/home-manager/traverseda/home.nix b/home-manager/traverseda/home.nix index 2d3273b..2a7323b 100644 --- a/home-manager/traverseda/home.nix +++ b/home-manager/traverseda/home.nix @@ -362,6 +362,17 @@ fi ''; }; + programs.bash = { + enable = true; + enableCompletion = true; + + initExtra = '' + if [[ -n ''${NVIM+x} ]]; then + alias vim="nvr --remote" + export EDITOR=nvr-edit + fi + ''; + }; # Enable home-manager and git programs.home-manager.enable = true; diff --git a/nixos/hardware/azrael.nix b/nixos/hardware/azrael.nix index bac1b43..41a3129 100644 --- a/nixos/hardware/azrael.nix +++ b/nixos/hardware/azrael.nix @@ -30,8 +30,10 @@ randomEncryption.enable = true; } ]; - - hardware.nvidia = { + hardware.nvidia-container-toolkit.enable = true; + hardware.nvidia = { + nvidiaPersistenced =true; + powerManagement.finegrained = true; prime = { offload = { enable = true; @@ -42,7 +44,8 @@ intelBusId = "PCI:0:0:2"; nvidiaBusId = "PCI:1:0:0"; }; - }; + }; + services.xserver.videoDrivers = [ "nvidia" ]; # 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 From f8145f3731f44dec11c27696655818d713046710 Mon Sep 17 00:00:00 2001 From: traverseda Date: Thu, 5 Sep 2024 12:31:18 +0000 Subject: [PATCH 2/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3345d4a..67703ad 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ nixos-rebuild build-vm --flake ./#athame ```bash sh <(curl -L https://nixos.org/nix/install) --daemon +nix-run -p home-manager home-manager switch --flake git+https://codeberg.org/traverseda/nixos-config.git?ref=main#traverseda@generic --extra-experimental-features nix-command --extra-experimental-features flakes ``` From f4983500fdb98b6b59d7eb2a1de9d222ca891d59 Mon Sep 17 00:00:00 2001 From: traverseda Date: Thu, 5 Sep 2024 13:07:22 +0000 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67703ad..ce889db 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ nixos-rebuild build-vm --flake ./#athame ```bash sh <(curl -L https://nixos.org/nix/install) --daemon -nix-run -p home-manager +nix-shell -p home-manager home-manager switch --flake git+https://codeberg.org/traverseda/nixos-config.git?ref=main#traverseda@generic --extra-experimental-features nix-command --extra-experimental-features flakes ``` From 25d882f6ac10c80f17e3a41518fab5654e9461d3 Mon Sep 17 00:00:00 2001 From: Alex Davies Date: Thu, 5 Sep 2024 13:16:54 -0300 Subject: [PATCH 4/4] Minor nvidia tweaks --- home-manager/traverseda/home.nix | 8 ++------ nixos/hardware/azrael.nix | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/home-manager/traverseda/home.nix b/home-manager/traverseda/home.nix index 2a7323b..4f4e666 100644 --- a/home-manager/traverseda/home.nix +++ b/home-manager/traverseda/home.nix @@ -291,12 +291,8 @@ programs.ssh = { enable = true; # Enable SSH module - extraConfig = '' - Host * - ControlMaster auto - ControlPath ~/.ssh/sockets/%r@%h-%p - ControlPersist 600 - ''; + controlMaster = "auto"; # Enable ControlMaster + controlPersist = "10m"; # Enable Control }; home.packages = [ diff --git a/nixos/hardware/azrael.nix b/nixos/hardware/azrael.nix index 41a3129..5a9854e 100644 --- a/nixos/hardware/azrael.nix +++ b/nixos/hardware/azrael.nix @@ -29,10 +29,8 @@ device = "/dev/nvme0n1p3"; randomEncryption.enable = true; } ]; - hardware.nvidia-container-toolkit.enable = true; hardware.nvidia = { - nvidiaPersistenced =true; powerManagement.finegrained = true; prime = { offload = {