From 2df69949cb27041cd54ed5a7b542a25248d627d9 Mon Sep 17 00:00:00 2001 From: minco Date: Fri, 31 Oct 2025 14:48:10 +0900 Subject: [PATCH] restore env, add pnpm home for nush --- modules/home/fish.nix | 11 ++++------- modules/home/fish/config.nix | 8 +------- modules/home/fish/env.nix | 16 +++++++--------- modules/home/nushell.nix | 9 +++++---- 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/modules/home/fish.nix b/modules/home/fish.nix index d6526a6..68075f9 100644 --- a/modules/home/fish.nix +++ b/modules/home/fish.nix @@ -1,9 +1,5 @@ -{ pkgs, ... }: -{ - imports = [ - ./fish/aliases.nix - ./fish/config.nix - ]; +{ pkgs, ... }: { + imports = [ ./fish/aliases.nix ./fish/config.nix ]; home.file.".config/fish/completions/flux.fish".source = ../../shell/completions/flux.fish; @@ -29,4 +25,5 @@ } ]; }; -} \ No newline at end of file +} + diff --git a/modules/home/fish/config.nix b/modules/home/fish/config.nix index 4afa6a9..29bea3a 100644 --- a/modules/home/fish/config.nix +++ b/modules/home/fish/config.nix @@ -1,7 +1 @@ -{ pkgs, ... }: -{ - imports = [ - ./env.nix - ./functions.nix - ]; -} +{ config, ... }: { imports = [ ./env.nix ./functions.nix ]; } diff --git a/modules/home/fish/env.nix b/modules/home/fish/env.nix index 4f25843..d5fe22e 100644 --- a/modules/home/fish/env.nix +++ b/modules/home/fish/env.nix @@ -1,15 +1,13 @@ -{ pkgs, ... }: { +{ config, ... }: { home.sessionVariables = { EDITOR = "nvim"; - PNPM_HOME = "$HOME/.local/share/pnpm"; - KUBECONFIG = "$HOME/.kube/config"; - OPENSSL_DIR = "${pkgs.openssl.dev}"; - OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; - OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; - PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; + PNPM_HOME = "${config.home.homeDirectory}/.local/share/pnpm"; + KUBECONFIG = "${config.home.homeDirectory}/.kube/config"; + # OPENSSL_DIR = "${pkgs.openssl.dev}"; + #OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; + # OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; + # PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; NIX_DEV_SHELL_DEFAULT_SHELL = "(which nu)"; }; - - home.sessionPath = [ "$HOME/.local/bin" "$PNPM_HOME" ]; } diff --git a/modules/home/nushell.nix b/modules/home/nushell.nix index 687b110..43ff61f 100644 --- a/modules/home/nushell.nix +++ b/modules/home/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ config, ... }: { imports = [ ./fish/env.nix ]; home.file.".config/nushell/nu".source = ../../shell/nu; @@ -6,8 +6,9 @@ nushell = { enable = true; shellAliases = { vi = "nvim"; }; - # environmentVariables = let env = import ./fish/env.nix { inherit pkgs; }; - # in env.home.sessionVariables; + environmentVariables = + let env = import ./fish/env.nix { inherit config; }; + in env.home.sessionVariables; extraConfig = '' source ~/.config/nushell/nu/config.nu let carapace_completer = {|spans| @@ -31,7 +32,7 @@ } $env.PATH = ($env.PATH | split row (char esep) | - append /usr/bin/env + append /usr/bin/env | append $"($env.HOME)/.local/share/pnpm" ) ''; };