nixos/modules/common/shell.nix
Jake Hillion 6bc301694a
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
direnv
2023-07-26 22:35:32 +01:00

44 lines
896 B
Nix

{ pkgs, lib, config, ... }:
{
config = {
users.defaultUserShell = pkgs.zsh;
environment.systemPackages = with pkgs; [ direnv ];
nix.settings = {
keep-outputs = true;
keep-derivations = true;
};
custom.impermanence.userExtraDirs.jake = [
".local/share/direnv"
];
programs.thefuck.enable = true;
programs.zsh = {
enable = true;
histSize = 1000000;
histFile = "$HOME/.zsh_history";
setOptions = [
"INC_APPEND_HISTORY"
"SHARE_HISTORY"
];
syntaxHighlighting = {
enable = true;
};
shellAliases = {
"nixos-rebuild" = "nixos-rebuild --flake \"/etc/nixos#${config.networking.fqdn}\"";
};
interactiveShellInit = with pkgs; ''
eval "$(${direnv}/bin/direnv hook zsh)"
source ${nix-direnv}/share/nix-direnv/direnvrc
'';
};
};
}