nixfleet/hmModules/shell/default.nix
Andrea Ciceri df2ab41246
All checks were successful
EVAL x86_64-linux.picard
BUILD x86_64-linux.picard
UPLOAD x86_64-linux.picard
DOWNLOAD x86_64-linux.picard
CACHIX x86_64-linux.picard
ATTIC x86_64-linux.picard
/ test (push) Successful in 7m14s
Disable atuin
2025-03-28 15:52:41 +01:00

145 lines
2.9 KiB
Nix

{
lib,
pkgs,
age,
hostname,
config,
username,
...
}:
{
programs.bat.enable = true;
programs.ranger = {
enable = true;
settings = {
"preview_images" = true;
"preview_images_method" = "sixel";
};
};
programs.fzf.enable = true;
programs.ripgrep.enable = true;
programs.fd.enable = true;
programs.direnv = {
enable = true;
config = {
warn_timeout = "60s"; # default was 5s
};
nix-direnv.enable = true;
};
programs.lsd = {
enable = true;
enableAliases = true;
};
programs.vim.enable = true;
programs.ssh = {
enable = true;
controlMaster = "auto";
};
systemd.user.services.atuind = {
Unit.Description = "Atuin daemon";
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStartPre = "${lib.getExe' pkgs.toybox "rm"} -f ${config.programs.atuin.settings.daemon.socket_path}";
ExecStart = "${lib.getExe pkgs.atuin} daemon";
};
};
programs.atuin = {
enable = false; # FIXME broken on bash: https://github.com/nix-community/home-manager/issues/5958
settings = {
daemon = {
enabled = true;
socket_path = "/home/${username}/.local/share/atuin/atuin.sock"; # FIXME using ~ or $HOME doesn't work: https://github.com/atuinsh/atuin/issues/2289
};
auto_sync = true;
sync_frequency = "5m";
sync_address = "http://sisko.wg.aciceri.dev:8889";
search_mode = "fuzzy";
style = "compact";
enter_accept = "true";
};
};
programs.bash = {
enable = true;
initExtra = lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
'';
shellAliases = {
"cat" = "bat";
};
};
programs.zoxide.enable = true;
programs.thefuck.enable = true;
programs.oh-my-posh = {
enable = true;
useTheme = "catppuccin_mocha";
};
programs.zellij.enableBashIntegration = false;
# programs.fish = {
# enable = true;
# plugins = [
# # {
# # name = "fifc";
# # src = pkgs.fishPlugins.fifc.src;
# # }
# {
# name = "z";
# src = pkgs.fishPlugins.z.src;
# }
# ];
# shellInit =
# ''
# # fish_vi_key_bindings
# fish_default_key_bindings
# ''
# + lib.optionalString (builtins.hasAttr "cachix-personal-token" age.secrets) ''
# export CACHIX_AUTH_TOKEN=$(cat ${age.secrets.cachix-personal-token.path})
# '';
# shellAliases = {
# "cat" = "bat";
# };
# };
home.packages =
with pkgs;
[
dig.dnsutils
lsof
comma
ffmpeg-headless
jless
nix-melt
nurl
jq
yq-go
procs
chafa
hexyl
broot
file
]
++ (lib.optionals
(builtins.elem hostname [
"kirk"
"picard"
])
[
cntr # TODO probably not best place
]
);
}