2022-03-09 01:15:44 +01:00
|
|
|
{ lib, pkgs, ... }:
|
2020-05-13 11:34:15 +02:00
|
|
|
let
|
|
|
|
shellAliases = import ./aliases.nix;
|
|
|
|
common = import ./common.nix;
|
2022-03-09 01:15:44 +01:00
|
|
|
|
2022-05-11 23:11:54 +02:00
|
|
|
globalTheme = pkgs.myThemes.current;
|
2022-03-09 01:15:44 +01:00
|
|
|
theme = "dangerous";
|
|
|
|
themePackage = builtins.getAttr theme pkgs.myFishPlugins.themes; # Dynamically pick the theme path
|
2022-05-11 23:11:54 +02:00
|
|
|
|
|
|
|
defaultDangerousColors = "000000 333333 666666 ff4ff0 0088ff ff6600 ff0000 ff0033 3300ff 0000ff 00ffff 00ff00";
|
|
|
|
dangerousColors = globalTheme.fish.dangerousColors or defaultDangerousColors;
|
2022-03-08 22:26:20 +01:00
|
|
|
in
|
|
|
|
{
|
2022-04-05 19:42:32 +02:00
|
|
|
users.defaultUserShell = pkgs.fish;
|
2022-03-09 01:15:44 +01:00
|
|
|
home-manager.users.adrielus = {
|
2022-12-05 01:18:31 +01:00
|
|
|
programs.command-not-found.enable = false;
|
|
|
|
programs.nix-index.enable = true;
|
|
|
|
|
2022-03-09 01:15:44 +01:00
|
|
|
# Source every file in the theme
|
|
|
|
xdg.configFile."fish/conf.d/plugin-${theme}.fish".text = lib.mkAfter ''
|
|
|
|
for f in $plugin_dir/*.fish
|
|
|
|
source $f
|
|
|
|
end
|
|
|
|
'';
|
|
|
|
|
|
|
|
programs.fish = {
|
|
|
|
inherit shellAliases;
|
|
|
|
|
|
|
|
enable = true;
|
|
|
|
plugins = with pkgs; [
|
|
|
|
myFishPlugins.z # jump around the file system with ease (might replace with autojump)
|
|
|
|
themePackage # theme
|
|
|
|
];
|
|
|
|
|
|
|
|
shellInit = ''
|
|
|
|
source ${../../../dotfiles/fish/config.fish}
|
2022-03-08 22:26:20 +01:00
|
|
|
|
2022-03-09 01:15:44 +01:00
|
|
|
# Source the entire oh-my-fish lib
|
|
|
|
for f in ${pkgs.myFishPlugins.oh-my-fish}/lib/git/**/*.fish
|
|
|
|
source $f
|
|
|
|
end
|
2022-03-08 22:26:20 +01:00
|
|
|
|
2022-05-11 23:11:54 +02:00
|
|
|
|
|
|
|
${if theme == "dangerous"
|
|
|
|
then "set dangerous_colors ${dangerousColors}"
|
|
|
|
else ""}
|
2020-04-12 18:57:47 +02:00
|
|
|
|
2022-03-09 01:15:44 +01:00
|
|
|
${common.shellInit}
|
|
|
|
'';
|
|
|
|
};
|
2021-11-29 15:00:11 +01:00
|
|
|
};
|
2020-04-12 18:57:47 +02:00
|
|
|
}
|