diff --git a/home-modules/common.nix b/home-modules/common.nix index 12d8d71..81c5e7e 100644 --- a/home-modules/common.nix +++ b/home-modules/common.nix @@ -40,6 +40,12 @@ in bash = { # This not only installs bash but has home-manager control .bashrc and friends enable = mkDefault true; + initExtra = + '' + flake-src() { + cd "$(nix eval "''${@:2}" --impure --raw --expr "builtins.getFlake \"$1\"")" + } + ''; }; direnv = {