From 95e3151508ba45f179e6822f7aa7a1dedb31a0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 3 Dec 2024 23:13:03 -0500 Subject: [PATCH 1/2] Fight like hell for a local bin --- configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configuration.nix b/configuration.nix index 1d4cd03..800d19b 100644 --- a/configuration.nix +++ b/configuration.nix @@ -89,6 +89,11 @@ # Add ~/.local/bin/ to $PATH environment.localBinInPath = true; + environment.homeBinInPath = true; + # Only this works, from https://github.com/NixOS/nixpkgs/issues/157383#issuecomment-1186081648 + environment.shellInit = '' + export PATH="$PATH:$HOME/.local/bin" + ''; # Needed for Slack but probably helps other stuff too. # See https://wiki.nixos.org/wiki/Slack From 35697e82dd0c81d8b4d4f7be0657fac3379e82cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 3 Dec 2024 23:13:36 -0500 Subject: [PATCH 2/2] Tell NixOS the hell with purity and let /bin/bash shebangs work --- configuration.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configuration.nix b/configuration.nix index 800d19b..7623044 100644 --- a/configuration.nix +++ b/configuration.nix @@ -136,6 +136,10 @@ LC_TIME = "en_US.UTF-8"; }; + # Just make bin/bash work, see https://github.com/Mic92/envfs + # via the long, sad https://discourse.nixos.org/t/add-bin-bash-to-avoid-unnecessary-pain/5673/37 + services.envfs.enable = true; + # Via https://github.com/NixOS/nixos-hardware/tree/master/framework services.fwupd.enable = true; services.fwupd.extraRemotes = [ "lvfs-testing" ];