add fish
This commit is contained in:
@@ -16,7 +16,7 @@ in
|
|||||||
./misc.nix
|
./misc.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
(import "${home-manager}/nixos")
|
(import "${home-manager}/nixos")
|
||||||
./user/stormwind/user.nix
|
./user/stormwind/master.nix
|
||||||
./sshd.nix
|
./sshd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
28
user/stormwind/fish.nix
Normal file
28
user/stormwind/fish.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
# These are all scoped in home-manager.users.stormwind.
|
||||||
|
{
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
interactiveShellInit = ''
|
||||||
|
set fish_greeting # Disable greeting
|
||||||
|
fish_vi_key_bindings # Vi bindings
|
||||||
|
'';
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
# Enable a plugin (here grc for colorized command output) from nixpkgs
|
||||||
|
{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
|
||||||
|
# Manually packaging and enable a plugin
|
||||||
|
{
|
||||||
|
name = "z";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "jethrokuan";
|
||||||
|
repo = "z";
|
||||||
|
rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb";
|
||||||
|
sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,6 +1,27 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# Also install these globally
|
||||||
|
programs.fish.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fishPlugins.done
|
||||||
|
fishPlugins.fzf-fish
|
||||||
|
fishPlugins.forgit
|
||||||
|
fishPlugins.hydro
|
||||||
|
fzf
|
||||||
|
fishPlugins.grc
|
||||||
|
grc
|
||||||
|
];
|
||||||
|
|
||||||
|
# Keep bash as the interactive shell (bcuz fish is not posix compliant) and launch fish immediately
|
||||||
|
programs.bash.interactiveShellInit = ''
|
||||||
|
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||||
|
then
|
||||||
|
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||||
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.stormwind = {
|
users.users.stormwind = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@@ -21,6 +42,7 @@
|
|||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./git.nix
|
./git.nix
|
||||||
|
./fish.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
Reference in New Issue
Block a user