feat: setup zsh as default shell
This commit is contained in:
parent
b220300e0c
commit
f488f772ee
|
@ -24,7 +24,7 @@
|
||||||
users.users.felschr = {
|
users.users.felschr = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "audio" ];
|
extraGroups = [ "wheel" "audio" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.felschr = import ./home/felschr.nix;
|
home-manager.users.felschr = import ./home/felschr.nix;
|
||||||
|
|
|
@ -1,8 +1,64 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
shellAliases = {
|
||||||
|
emacs = "emacsclient -c";
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
programs.fzf = {
|
||||||
./shell.nix
|
enable = true;
|
||||||
./direnv.nix
|
};
|
||||||
];
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
line_break = {
|
||||||
|
disabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableAutosuggestions = true;
|
||||||
|
autocd = true;
|
||||||
|
defaultKeymap = "viins";
|
||||||
|
initExtraBeforeCompInit = with pkgs; ''
|
||||||
|
source ${zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
source ${zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||||
|
'';
|
||||||
|
initExtra = ''
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
setopt histignoredups
|
||||||
|
bindkey '^[[A' history-substring-search-up
|
||||||
|
bindkey '^[[B' history-substring-search-down
|
||||||
|
bindkey -M vicmd 'k' history-substring-search-up
|
||||||
|
bindkey -M vicmd 'j' history-substring-search-down
|
||||||
|
'';
|
||||||
|
history.extended = true;
|
||||||
|
inherit shellAliases;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellInit = ''
|
||||||
|
fish_vi_key_bindings
|
||||||
|
'';
|
||||||
|
inherit shellAliases;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
inherit shellAliases;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
stdlib = builtins.readFile ./.direnvrc;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".envrc".text = ''
|
||||||
|
dotenv
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
with pkgs;
|
|
||||||
{
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
stdlib = builtins.readFile ./.direnvrc;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".envrc".text = ''
|
|
||||||
dotenv
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
shellAliases = {
|
|
||||||
emacs = "emacsclient -c";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellInit = ''
|
|
||||||
fish_vi_key_bindings
|
|
||||||
'';
|
|
||||||
inherit shellAliases;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
inherit shellAliases;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -27,7 +27,7 @@
|
||||||
users.users.felschr = {
|
users.users.felschr = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "audio" "docker" "disk" "vboxusers" ];
|
extraGroups = [ "wheel" "audio" "docker" "disk" "vboxusers" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.felschr = import ./home/felschr-work.nix;
|
home-manager.users.felschr = import ./home/felschr-work.nix;
|
||||||
|
|
Loading…
Reference in a new issue