fish in user

This commit is contained in:
Julien Malka 2024-04-04 18:08:12 +02:00
parent e190a4fd25
commit 2da2c4a8ff
Signed by: Luj
GPG key ID: 6FC74C847011FD83
2 changed files with 98 additions and 8 deletions

View file

@ -0,0 +1,97 @@
{ config, pkgs, lib, ... }:
let
cfg = config.luj.programs.fish;
inherit (pkgs) fetchFromGitHub;
in
with lib;
{
options.luj.programs.fish = {
enable = mkEnableOption "Enable fish";
};
config = mkIf cfg.enable {
programs.fish = {
enable = true;
shellAliases = {
ka = "killall";
mkd = "mkdir -pv";
ca = "khal interactive";
sync_ca = "vsync sync";
dnd = "dunstctl set-paused true";
nodnd = "dunstctl set-paused false";
lg = "lazygit";
g = "git";
gua = "git remote | xargs -L1 git push --all";
v = "$EDITOR";
sdn = "shutdown now";
SU = "systemctl --user";
SS = "sudo systemctl";
weather = "curl wttr.in";
v6 = "curl api6.ipify.org";
v4 = "curl api.ipify.org";
clbin = "curl -F'clbin=<-' https://clbin.com";
_0x0 = "curl -F'file=@-' https://0x0.st";
phs = "python -m http.server";
ls = "eza";
rtmv = "rsync -avP";
archive = "rsync --remove-source-files -avPzz";
luks_integrity_check = "gocryptfs -fsck -extpass 'pass Private/LUKS' /boot/luks";
fetch-emails = "mbsync --all && notmuch new && afew -t -n -v";
nsp = "nix-shell -p";
ns = "nix-shell";
ncg = "sudo nix-collect-garbage --delete-older-than 30d";
ncga = "sudo nix-collect-garbage -d";
nso = "sudo nix-store --optimise";
lln = "NIX_PATH=\"nixpkgs=$LOCAL_NIXPKGS_CHECKOUT\"";
# Local build
lnb = "NIX_PATH=\"nixpkgs=$LOCAL_NIXPKGS_CHECKOUT\" nom-build '<nixpkgs>' --no-out-link -A $1";
# Local shell
lns = "NIX_PATH=\"nixpkgs=$LOCAL_NIXPKGS_CHECKOUT\" nix-shell -p $1";
# Local test
ltt = ''NIX_PATH=\"nixpkgs=$LOCAL_NIXPKGS_CHECKOUT\" nom-build --no-out-link "$LOCAL_NIXPKGS_CHECKOUT/nixos/tests/$1"'';
};
};
# Broot
programs.broot = {
enable = true;
enableFishIntegration = true;
};
# Direnv: must have.
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
programs.oh-my-posh = {
enable = true;
enableFishIntegration = true;
useTheme = "catppuccin_mocha";
};
# Misc
programs.lesspipe.enable = true;
home.packages = with pkgs; [ eza python3 libnotify ];
};
}

View file

@ -8,14 +8,7 @@
luj.programs.neovim.enable = true;
luj.programs.ssh-client.enable = true;
luj.programs.git.enable = true;
programs.direnv = {
enable = true;
enableFishIntegration = true;
nix-direnv.enable = true;
};
luj.programs.fish.enable = true;
};
}