fix: (GO)PATH

Signed-off-by: jolheiser <john.olheiser@gmail.com>
teamcity
jolheiser 2023-08-02 19:54:50 -05:00
parent 1d2e8ed75c
commit 1dca29b8e4
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
8 changed files with 27 additions and 6 deletions

View File

@ -21,6 +21,7 @@
./ssh.nix ./ssh.nix
./tiny.nix ./tiny.nix
./wezterm.nix ./wezterm.nix
./xdg.nix
./zoxide.nix ./zoxide.nix
]; ];
home = { home = {

View File

@ -1 +1,7 @@
{programs.go.enable = true;} {config, ...}: {
programs.go = rec {
enable = true;
goPath = "${config.xdg.dataHome}/go";
goBin = "${goPath}/bin";
};
}

View File

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
config,
...
}: {
programs.nushell = { programs.nushell = {
enable = true; enable = true;
configFile.source = ./nushell/config.nu; configFile.source = ./nushell/config.nu;
@ -19,6 +23,10 @@
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/just/just.nu * use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/just/just.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/nix/nix-completions.nu * use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/nix/nix-completions.nu *
''; '';
extraEnv = ''
let-env GOPATH = "${config.xdg.dataHome}/go"
let-env PATH = ($env.PATH | split row (char esep) | prepend '${config.xdg.dataHome}/go/bin')
'';
}; };
xdg.configFile = { xdg.configFile = {
"nushell/jolheiser.nu".source = ./nushell/jolheiser.nu; "nushell/jolheiser.nu".source = ./nushell/jolheiser.nu;

View File

@ -60,4 +60,3 @@ let-env NU_PLUGIN_DIRS = [
# To add entries to PATH (on Windows you might use Path), you can use the following pattern: # To add entries to PATH (on Windows you might use Path), you can use the following pattern:
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path') # let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path')

View File

@ -33,7 +33,7 @@ end)
-- config -- config
return { return {
default_prog = { "nu", "--config", "~/.config/nushell/config.nu", "--env-config", "~/.config/nushell/config.nu" }, default_prog = { "nu", "--config", "~/.config/nushell/config.nu", "--env-config", "~/.config/nushell/env.nu" },
color_scheme = theme_for_appearance(wezterm.gui.get_appearance()), color_scheme = theme_for_appearance(wezterm.gui.get_appearance()),
window_close_confirmation = 'NeverPrompt', window_close_confirmation = 'NeverPrompt',
window_background_opacity = opacity, window_background_opacity = opacity,

9
apps/xdg.nix 100644
View File

@ -0,0 +1,9 @@
{config, ...}: {
xdg = {
enable = true;
userDirs.enable = true;
cacheHome = "${config.home.homeDirectory}/.cache";
configHome = "${config.home.homeDirectory}/.config";
dataHome = "${config.home.homeDirectory}/.local/share";
};
}

View File

@ -41,7 +41,6 @@ in {
users.users."${username}" = { users.users."${username}" = {
extraGroups = ["wheel" "docker"]; extraGroups = ["wheel" "docker"];
isNormalUser = true; isNormalUser = true;
shell = pkgs.nushell;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -43,7 +43,6 @@ in {
users.users."${username}" = { users.users."${username}" = {
extraGroups = ["wheel" "docker" "storage"]; extraGroups = ["wheel" "docker" "storage"];
isNormalUser = true; isNormalUser = true;
shell = pkgs.nushell;
}; };
system.stateVersion = "22.11"; system.stateVersion = "22.11";