diff --git a/home/neovim/settings.nix b/home/neovim/settings.nix index 3eb3e55..8c3b0f6 100644 --- a/home/neovim/settings.nix +++ b/home/neovim/settings.nix @@ -1,6 +1,11 @@ { ... }: { programs.nixvim = { + # Has not effect... the workaround is to set neovim as the general default editour with + # `programs.neovim.defaultEditor = true` in `system/programs/neovim/default.nix`. + # + # see https://github.com/nix-community/home-manager/issues/4969 and in particular + # https://github.com/nix-community/home-manager/issues/4559. defaultEditor = true; vimdiffAlias = true; enableMan = true; diff --git a/home/shell/bash.nix b/home/shell/bash.nix index f0289fc..0be07a0 100644 --- a/home/shell/bash.nix +++ b/home/shell/bash.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, ... }: +{ + lib, + pkgs, + config, + ... +}: let inherit (import ./bt-devices.nix { inherit lib pkgs; }) btDevices bluetoothctl; @@ -19,6 +24,23 @@ in initExtra = '' ${builtins.concatStringsSep "\n" btConnFuncs} + + # Add go's bin directory to path + # + # For the record: doing something like this would be more idiomatic... + # ```nix + # home.sessionPath = [ + # # Add ~/go/bin to $PATH + # "${config.home.homeDirectory}/go/bin" + # ]; + # ``` + # ... but unfortunately, this doesn't work for reasons, outlined in + # https://github.com/nix-community/home-manager/issues/4969 and + # https://github.com/nix-community/home-manager/issues/4559, so we're using this workaround + # below \o/ + if [[ ":$PATH:" != *":$HOME/go/bin:"* ]]; then + export PATH="$PATH:$HOME/go/bin" + fi ''; }; } diff --git a/home/shell/fish.nix b/home/shell/fish.nix index 0f4bb2e..b467793 100644 --- a/home/shell/fish.nix +++ b/home/shell/fish.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, ... }: +{ + lib, + pkgs, + config, + ... +}: let inherit (import ./bt-devices.nix { inherit lib pkgs; }) btDevices bluetoothctl; @@ -23,6 +28,21 @@ in bind \cd delete-char ${builtins.concatStringsSep "\n" btConnFuncs} + + # Add go's bin directory to path + # + # For the record: doing something like this would be more idiomatic... + # ```nix + # home.sessionPath = [ + # # Add ~/go/bin to $PATH + # "${config.home.homeDirectory}/go/bin" + # ]; + # ``` + # ... but unfortunately, this doesn't work for reasons, outlined in + # https://github.com/nix-community/home-manager/issues/4969 and + # https://github.com/nix-community/home-manager/issues/4559, so we're using this workaround + # below \o/ + fish_add_path ~/go/bin ''; }; } diff --git a/home/tools/dev.nix b/home/tools/dev.nix index c03db98..fcd21af 100644 --- a/home/tools/dev.nix +++ b/home/tools/dev.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { home.packages = [ # Git tools @@ -29,9 +29,4 @@ pkgs.nvd pkgs.nixfmt-tree ]; - - # Add ~/go/bin to $PATH - home.sessionPath = [ - "${config.home.homeDirectory}/go/bin" - ]; }