From 990d7dc76dae67339fc74c31bc80cc764e673f13 Mon Sep 17 00:00:00 2001 From: Rudolf Tucek Date: Sat, 19 Sep 2026 23:27:01 +0200 Subject: [PATCH 1/4] golang: add golang's bin directory to path --- home/shell/bash.nix | 24 +++++++++++++++++++++++- home/shell/fish.nix | 22 +++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) 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 ''; }; } From 1acaf48222b054d0e7f165763d237bdea39d4033 Mon Sep 17 00:00:00 2001 From: Rudolf Tucek Date: Sat, 19 Sep 2026 23:28:24 +0200 Subject: [PATCH 2/4] golang: remove broken, but "idiomatic" implementation of adding golang's bin path --- home/tools/dev.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/home/tools/dev.nix b/home/tools/dev.nix index c03db98..5dee4d5 100644 --- a/home/tools/dev.nix +++ b/home/tools/dev.nix @@ -29,9 +29,4 @@ pkgs.nvd pkgs.nixfmt-tree ]; - - # Add ~/go/bin to $PATH - home.sessionPath = [ - "${config.home.homeDirectory}/go/bin" - ]; } From d07b2d959301d0993157254491e33a8d85a71499 Mon Sep 17 00:00:00 2001 From: Rudolf Tucek Date: Sat, 19 Sep 2026 23:30:19 +0200 Subject: [PATCH 3/4] neovim: document whu `programs.nixvim.defaultEditor` doesn't work as expected --- home/neovim/settings.nix | 5 +++++ 1 file changed, 5 insertions(+) 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; From 6ec0d806e549804bcac95d57ec67191302565081 Mon Sep 17 00:00:00 2001 From: Rudolf Tucek Date: Sat, 19 Sep 2026 23:42:57 +0200 Subject: [PATCH 4/4] Fix lint errors --- home/tools/dev.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/tools/dev.nix b/home/tools/dev.nix index 5dee4d5..fcd21af 100644 --- a/home/tools/dev.nix +++ b/home/tools/dev.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { home.packages = [ # Git tools