working fish shell
This commit is contained in:
parent
2d5ee6c621
commit
8b92b025f3
17 changed files with 134 additions and 109 deletions
26
modules/user/shell/default.nix
Normal file
26
modules/user/shell/default.nix
Normal 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";
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue