dotfiles/modules/cli/default.nix

100 lines
2.0 KiB
Nix
Raw Normal View History

2021-09-14 20:55:50 +02:00
{ config, lib, pkgs, ... }:
{
2022-03-23 12:44:08 +01:00
imports = [
./adb.nix
./bin
./direnv.nix
./git.nix
./nix.nix
./ssh.nix
./shell
./spotify.nix
];
2022-03-22 19:33:01 +01:00
modules.cli.shell = let
# HACK to fix 24bit color support with kitty
editor = "TERM=kitty-direct emacsclient -t -a 'emacs -t'";
in {
name = "fish";
abbreviations = {
us = "systemctl --user";
rs = "doas systemctl";
ga = "git add";
gb = "git branch";
gc = "git commit";
gco = "git checkout";
gd = "git diff";
gds = "git diff --staged";
gp = "git push";
gs = "git status";
};
aliases = {
du = "dust";
ls = "exa -lh --icons --git";
cat = "bat";
feh = "feh --auto-zoom --scale-down";
grep = "rg";
rm = "rm -i";
mv = "mv -i";
# HACK to fix kitty not being recongized
ssh = "TERM=xterm-color command ssh";
nix-switch = "doas nixos-rebuild switch --flake ~/.dotfiles";
nix-boot = "doas nixos-rebuild boot --flake ~/.dotfiles";
nix-lock =
"doas nixos-rebuild dry-activate --flake ~/.dotfiles --recreate-lock-file";
emacs = editor;
2022-04-18 12:23:45 +02:00
nixpkgs-pr = "nixpkgs-review pr --token ${
if (config.modules.cli.shell.name == "fish") then "" else "$"
}(cat /run/agenix/github)";
2022-03-22 19:33:01 +01:00
};
variables = { EDITOR = editor; };
};
2021-12-04 11:44:01 +01:00
home-manager.users.moritz = {
2021-12-04 11:45:01 +01:00
home.packages = with pkgs; [
# archives
p7zip
2021-12-24 12:44:09 +01:00
# file management
2021-12-04 11:45:01 +01:00
ranger
trash-cli
2022-03-21 13:20:46 +01:00
# monitoring
htop
2022-04-18 12:20:28 +02:00
bottom
2022-03-21 13:20:46 +01:00
2021-12-04 11:45:01 +01:00
# fetcher
neofetch
2021-12-24 12:44:09 +01:00
# typing
ttyper
2022-01-21 22:06:47 +01:00
# ripping
abcde
handbrake
2022-03-21 13:20:46 +01:00
# utility
cht-sh
2022-04-18 12:23:45 +02:00
nixpkgs-review
2021-12-04 11:45:01 +01:00
];
2021-12-04 11:44:01 +01:00
programs = {
bat.enable = true;
2022-03-21 13:20:46 +01:00
command-not-found.enable = true;
exa.enable = true;
fzf.enable = true;
2022-01-24 12:40:44 +01:00
gpg.enable = true;
2022-03-21 13:20:46 +01:00
starship.enable = true;
2021-12-04 11:44:01 +01:00
};
};
2022-04-18 12:23:45 +02:00
age.secrets = {
github = {
file = ../../secrets/github.age;
owner = "1000";
};
};
2021-09-14 20:55:50 +02:00
}