1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add some necessary plumbing

This commit is contained in:
oddlama 2022-12-15 17:46:53 +01:00
parent 449d9a2200
commit 5f6012faf1
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
9 changed files with 213 additions and 20 deletions

View file

@ -5,11 +5,10 @@
#./atuin.nix
#./bash.nix
#./btop.nix
#./fish.nix
#./git.nix
./fish.nix
./git.nix
./htop.nix
#./neovim
./nushell.nix
#./ssh.nix
./starship.nix
#./tmux.nix
@ -23,7 +22,6 @@
bandwhich
btop
fd
kalker
neofetch
rclone
ripgrep
@ -45,7 +43,6 @@
chmod = "chmod -c --preserve-root";
chown = "chown -c --preserve-root";
vim = "nvim";
ip = "ip --color";
tmux = "tmux -2";
rg = "rg -S";

47
users/common/fish.nix Normal file
View file

@ -0,0 +1,47 @@
{
lib,
pkgs,
...
}: {
programs = {
fish = {
enable = true;
interactiveShellInit = lib.mkMerge [
(lib.mkBefore ''
set -g ATUIN_NOBIND true
set -g fish_escape_delay_ms 300
set -g fish_greeting
'')
(lib.mkAfter ''
enable_ayu_theme_dark
${pkgs.any-nix-shell}/bin/any-nix-shell fish | source
fish_vi_key_bindings insert
# atuin
bind -M insert \cr _atuin_search
# quickly open text file
bind -M insert \co 'fzf | xargs -r $VISUAL'
'')
];
plugins = [
{
name = "ayu-theme.fish";
src = pkgs.fetchFromGitHub {
owner = "edouard-lopez";
repo = "ayu-theme.fish";
rev = "d351d24263d87bef3a90424e0e9c74746673e383";
hash = "sha256-rx9izD2pc3hLObOehuiMwFB4Ta5G1lWVv9Jdb+JHIz0=";
};
}
{
name = "autopair.fish";
src = pkgs.fetchFromGitHub {
owner = "jorgebucaran";
repo = "autopair.fish";
rev = "1.0.4";
hash = "sha256-s1o188TlwpUQEN3X5MxUlD/2CFCpEkWu83U9O+wg3VU=";
};
}
];
};
};
}

38
users/common/git.nix Normal file
View file

@ -0,0 +1,38 @@
{
lib,
pkgs,
...
}: {
programs.gitui.enable = true;
programs.git = {
enable = true;
difftastic.enable = true;
lfs.enable = lib.mkDefault false;
extraConfig = {
#diff = {
# colorMoved = "default";
# age.textconv = "${pkgs.rage}/bin/rage -i ~/.ssh/username --decrypt";
#};
difftool.prompt = true;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
mergetool.prompt = true;
};
aliases = {
unstash = "stash pop";
s = status;
tags = "tag -l";
t = "tag -s -m ''";
ci = "commit -v -S";
cam = "commit -v -S --amend";
};
};
home.shellAliases = rec {
g = "gitui";
gs = "git status";
ga = "git add";
gc = "git commit -v -S";
gca = "${gci} --amend";
};
}

View file

@ -1,5 +0,0 @@
{
programs.nushell = {
enable = true;
};
}