diff --git a/hosts/dunamis/programs.nix b/hosts/dunamis/programs.nix index 3abc859..8be2b46 100644 --- a/hosts/dunamis/programs.nix +++ b/hosts/dunamis/programs.nix @@ -10,6 +10,7 @@ clean.extraArgs = "--keep-since 7d --keep 3"; flake = "/home/user/.config/nixos"; }; + programs.fish.enable = true; environment.systemPackages = with pkgs; [ helix nushell diff --git a/hosts/dunamis/users.nix b/hosts/dunamis/users.nix index 18d4cb4..f92dbe9 100644 --- a/hosts/dunamis/users.nix +++ b/hosts/dunamis/users.nix @@ -4,7 +4,7 @@ user = { isNormalUser = true; extraGroups = ["wheel" "video" "libvirtd" "dialout"]; - shell = pkgs.nushell; + shell = pkgs.fish; }; # work = { # isNormalUser = true; diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index 4f9e1b2..6b0c729 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -1,6 +1,7 @@ {pkgs, ...}: { shell = { - nushell.enable = true; + fish.enable = true; + nushell.enable = false; oh-my-posh.enable = true; }; diff --git a/modules/home/programs/shell/default.nix b/modules/home/programs/shell/default.nix index fd8a6f4..de1a6ce 100644 --- a/modules/home/programs/shell/default.nix +++ b/modules/home/programs/shell/default.nix @@ -1,3 +1,3 @@ { - imports = [./nushell.nix ./oh-my-posh.nix]; + imports = [./nushell.nix ./fish.nix ./oh-my-posh.nix]; } diff --git a/modules/home/programs/shell/fish.nix b/modules/home/programs/shell/fish.nix new file mode 100644 index 0000000..d42dae1 --- /dev/null +++ b/modules/home/programs/shell/fish.nix @@ -0,0 +1,55 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.shell.fish; +in { + options = { + shell.fish.enable = + mkEnableOption "enable fish"; + }; + config = mkIf cfg.enable { + programs = { + # atuin = { + # enable = true; + # flags = [ + # "--disable-up-arrow" + # ]; + # }; + # }; + eza.enable = true; + zoxide.enable = true; + keychain = { + enable = true; + keys = ["id_ed25519"]; + extraFlags = [ + "--quiet" + "--noask" + ]; + }; + fish = { + enable = true; + shellAliases = { + # cd = "z"; + cat = "bat"; + la = "ls -a"; + l = "ls -la"; + }; + interactiveShellInit = '' + set fish_greeting + set fish_cursor_default block blink + set fish_cursor_insert line blink + set fish_cursor_replace_one underscore blink + set fish_cursor_visual block + + function fish_user_key_bindings + fish_default_key_bindings -M insert + fish_vi_key_bindings --no-erase insert + end + ''; + }; + }; + }; +}