working fish shell

This commit is contained in:
Charlie Root 2024-11-01 15:54:20 +01:00
commit 8b92b025f3
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
17 changed files with 134 additions and 109 deletions

View file

@ -0,0 +1,26 @@
# This shell setup was inspired by sioodmy. Check out his setup!
{pkgs, ...}: let
toml = pkgs.formats.toml {};
starship-config = import ./starship.nix;
aliases = import ./aliases.nix {inherit pkgs;};
fishinit = import ./fishinit.nix {inherit pkgs aliasesStr;};
aliasesStr =
pkgs.lib.concatStringsSep "\n"
(pkgs.lib.mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases);
packages = import ./packages.nix pkgs;
in
(pkgs.symlinkJoin {
name = "fish-wrapped";
paths = [pkgs.fish] ++ packages;
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
'';
})
.overrideAttrs (_: {
passthru = {
shellPath = "/bin/fish";
};
})