nixos/share/home.nix

130 lines
3 KiB
Nix
Raw Normal View History

2024-06-27 20:37:20 +02:00
{
# initial version
home.stateVersion = "22.11";
2024-07-19 17:56:28 +02:00
# my nushell config
programs.nushell = {
# we use nushell
2024-06-27 20:37:20 +02:00
enable = true;
2024-06-27 23:19:37 +02:00
2024-07-19 17:56:28 +02:00
# shell config
extraConfig = ''
2024-07-19 20:15:48 +02:00
$env.config = {
history: {
max_size: 100_000
file_format: "sqlite"
isolation: true
}
2024-07-19 17:56:28 +02:00
table: {
2024-07-19 20:15:48 +02:00
mode: none
}
}
'';
2024-06-27 23:19:37 +02:00
2024-06-27 20:37:20 +02:00
# aliases
shellAliases = {
# system build/update/cleanup
2024-07-12 19:35:16 +02:00
update = "sudo nixos-rebuild boot";
upgrade = "sudo nixos-rebuild boot --upgrade";
updatenow = "sudo nixos-rebuild switch";
upgradenow = "sudo nixos-rebuild switch --upgrade";
2024-06-27 20:37:20 +02:00
gc = "sudo nix-collect-garbage --delete-older-than 7d";
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
2024-07-02 22:38:56 +02:00
# list latest files last
ltr = "eza -l -s modified";
2024-06-27 20:37:20 +02:00
# ssh around in the local network
2024-07-04 18:45:33 +02:00
beta = "ssh beta.fritz.box";
betaroot = "ssh root@beta.fritz.box";
2024-07-06 22:37:22 +02:00
bsd = "ssh bsd.fritz.box";
bsdroot = "ssh root@bsd.fritz.box";
2024-06-27 20:37:20 +02:00
mac = "ssh mac.fritz.box";
macroot = "ssh root@mac.fritz.box";
mini = "ssh mini.fritz.box";
miniroot = "ssh root@mini.fritz.box";
neko = "ssh neko.fritz.box";
nekoroot = "ssh root@neko.fritz.box";
};
2024-07-19 17:56:28 +02:00
};
2024-06-27 20:37:20 +02:00
# nice prompt
# https://starship.rs/config/
# https://draculatheme.com/starship
programs.starship = {
2024-06-27 20:37:20 +02:00
enable = true;
2024-07-19 17:56:28 +02:00
enableNushellIntegration = true;
settings = {
2024-07-21 15:41:29 +02:00
command_timeout = 10000;
aws.style = "bold #ffb86c";
cmd_duration.style = "bold #f1fa8c";
directory.style = "bold #50fa7b";
hostname.style = "bold #ff5555";
git_branch.style = "bold #ff79c6";
git_status.style = "bold #ff5555";
username = {
format = "[$user]($style) on ";
style_user = "bold #bd93f9";
};
character = {
success_symbol = "[](bold #f8f8f2)";
error_symbol = "[](bold #ff5555)";
};
directory = {
truncation_length = 8;
truncate_to_repo = false;
};
};
2024-06-27 20:37:20 +02:00
};
# nice cd
programs.zoxide = {
enable = true;
2024-07-19 17:56:28 +02:00
enableNushellIntegration = true;
2024-06-27 20:37:20 +02:00
options = [ "--cmd" "cd" ];
};
2024-07-13 15:12:29 +02:00
# better completion
programs.carapace = {
enable = true;
2024-07-19 17:56:28 +02:00
enableNushellIntegration = true;
2024-07-13 15:12:29 +02:00
};
2024-07-02 22:33:05 +02:00
# better ls, adds la and Co. aliases, too
programs.eza = {
enable = true;
2024-07-19 17:56:28 +02:00
enableNushellIntegration = true;
2024-07-16 22:50:37 +02:00
};
2024-07-02 22:33:05 +02:00
# better cat
programs.bat = {
enable = true;
};
# better find
programs.fd = {
enable = true;
};
2024-07-21 16:46:22 +02:00
# file manager
programs.yazi = {
enable = true;
enableNushellIntegration = true;
};
2024-06-27 20:37:20 +02:00
# enable keychain, we use the main user key
programs.keychain = {
enable = true;
2024-07-21 16:46:22 +02:00
enableNushellIntegration = true;
2024-06-27 20:37:20 +02:00
keys = [ "/home/cullmann/.ssh/id_ed25519" ];
};
# https://github.com/nix-community/nix-direnv
programs.direnv = {
enable = true;
2024-07-21 16:46:22 +02:00
enableNushellIntegration = true;
2024-06-27 20:37:20 +02:00
nix-direnv.enable = true;
};
}