Skip to content

Commit

Permalink
fix: set env vars for fish shell
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Jan 28, 2024
1 parent 75ebc33 commit 53180f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/findgpu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in {
# Make sure that no user uses all GPUs accidentally
"profile.d/gpu-selection.sh".text = ''
export CUDA_VISIBLE_DEVICES="100"
export CUDA_DEVICE_ORDER="PCI_BUS_ID
'';
};
};
Expand Down
7 changes: 5 additions & 2 deletions modules/fish.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# https://github.com/numtide/system-manager/blob/main/nix/modules/environment.nix
# We use config.fish directly since conf.d is not sources by fish built with nix
{pkgs, ...}: {
environment.etc."fish/conf.d/wi2-system-manager-path.fish".source = pkgs.writeTextFile {
name = "wi2-system-manager-path.fish";
environment.etc."fish/config.fish".source = pkgs.writeTextFile {
name = "config.fish";
executable = true;
text = ''
set -gx PATH "/run/system-manager/sw/bin" $PATH
set -gx CUDA_VISIBLE_DEVICES 100
set -gx CUDA_DEVICE_ORDER PCI_BUS_ID
'';
};
}

0 comments on commit 53180f3

Please sign in to comment.