From 505e65b7e60810711fb185a50d97d44a2b0b2bc4 Mon Sep 17 00:00:00 2001 From: Sense T Date: Fri, 7 Jul 2023 05:04:37 +0000 Subject: [PATCH] fix sessionPath problem --- home.nix | 5 +++-- programs.nix | 11 ++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/home.nix b/home.nix index f753184..5d7257c 100644 --- a/home.nix +++ b/home.nix @@ -36,6 +36,7 @@ openssh rnix-lsp.rnix-lsp qemu + gcc9 ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage @@ -62,8 +63,8 @@ }; home.sessionPath = [ - ".local/bin" - ".cargo/bin" + "$HOME/.local/bin" + "$HOME/.cargo/bin" ]; home.shellAliases = { diff --git a/programs.nix b/programs.nix index 6b9f1e5..3a32d89 100644 --- a/programs.nix +++ b/programs.nix @@ -1,4 +1,4 @@ -{ +{ lib, config, ... }: { programs = { ssh = { enable = true; @@ -39,15 +39,12 @@ oh-my-zsh = { enable = true; - plugins = [ "sudo" "git" "golang" "thefuck" "kubectl" "pip" "npm" "yarn" "vscode" ]; + plugins = [ "sudo" "git" "golang" "thefuck" "kubectl" "pip" "npm" "yarn" "vscode" "rust" ]; theme = "fishy"; }; - profileExtra = '' - # added by Nix installer - if [ -e /home/coder/.nix-profile/etc/profile.d/nix.sh ]; then - . /home/coder/.nix-profile/etc/profile.d/nix.sh - fi + initExtra = lib.optionalString (config.home.sessionPath != [ ]) '' + export PATH="$PATH''${PATH:+:}${lib.concatStringsSep ":" config.home.sessionPath}" ''; }; };