2024-11-01 15:54:20 +01:00
|
|
|
# This shell setup was inspired by sioodmy. Check out his setup!
|
2024-11-03 15:29:32 +01:00
|
|
|
{pkgs, ...}: let
|
2024-11-01 15:54:20 +01:00
|
|
|
toml = pkgs.formats.toml {};
|
|
|
|
starship-config = import ./starship.nix;
|
|
|
|
aliases = import ./aliases.nix {inherit pkgs;};
|
|
|
|
|
|
|
|
fishinit = import ./fishinit.nix {inherit pkgs aliasesStr;};
|
|
|
|
|
|
|
|
aliasesStr =
|
2025-06-04 08:27:12 +02:00
|
|
|
mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases
|
|
|
|
|> concatStringsSep "\n";
|
|
|
|
|
2024-11-01 15:54:20 +01:00
|
|
|
packages = import ./packages.nix pkgs;
|
2024-11-02 11:28:08 +01:00
|
|
|
|
|
|
|
# this was taken from viperml, check out his config for this!
|
|
|
|
custom-fish = pkgs.fish.overrideAttrs (old: {
|
|
|
|
patches = [./fish-on-tmpfs.patch];
|
|
|
|
doCheck = false;
|
|
|
|
postInstall =
|
|
|
|
old.postInstall
|
|
|
|
+ ''
|
|
|
|
echo "source ${fishinit}" >> $out/etc/fish/config.fish
|
|
|
|
'';
|
|
|
|
});
|
2024-11-01 15:54:20 +01:00
|
|
|
in
|
|
|
|
(pkgs.symlinkJoin {
|
2025-03-31 11:32:19 +02:00
|
|
|
name = "fish";
|
2024-11-02 11:28:08 +01:00
|
|
|
paths = [custom-fish] ++ packages;
|
2025-04-16 22:34:25 +02:00
|
|
|
nativeBuildInputs = [pkgs.makeWrapper];
|
2024-11-01 15:54:20 +01:00
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
.overrideAttrs (_: {
|
|
|
|
passthru = {
|
|
|
|
shellPath = "/bin/fish";
|
|
|
|
};
|
|
|
|
})
|