sadasd
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
# config.services.headscale.group
|
||||
];
|
||||
|
||||
initialHashedPassword = "$6$yNgxTHcP1UYkNwuZ$1sBehnKgPjVnDe0tSV8kyfynWpfjDzuohZX6SoTrMnYFa3/aiMOtI6JppYevl.M6qYhBIT0XBvL6TqSSFWn8B/";
|
||||
initialHashedPassword = "$6$yNgxTHcP1UYkNwuZ$1sBehnKgPjVnDe0tSV8kyfynWpfjDzuohZX6SoTrMnYFa3/aiMOtI6JppYevl.M6qYhBIT0XBvL6TqSSFWn8B/"; # mkpasswd
|
||||
|
||||
# TODO: fetch from github?
|
||||
openssh.authorizedKeys.keys = [
|
||||
|
||||
@@ -44,4 +44,5 @@ in
|
||||
};
|
||||
|
||||
# TODO: generate bat syntax cache: 'bat cache --build'
|
||||
# TODO: JQ_COLORS: https://jqlang.org/manual/#colors
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
# bash integration, optional
|
||||
# https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup
|
||||
|
||||
# # Make order 101 to be placed exactly after bash completions, as Ghostty
|
||||
# # documentation suggests sourcing the script as soon as possible
|
||||
# programs.bash.initExtra = lib.mkOrder 101 ''
|
||||
# if [[ -n "''${GHOSTTY_RESOURCES_DIR}" ]]; then
|
||||
# builtin source "''${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
|
||||
# fi
|
||||
# '';
|
||||
# Make order 101 to be placed exactly after bash completions, as Ghostty
|
||||
# documentation suggests sourcing the script as soon as possible
|
||||
programs.bash.initExtra = lib.mkOrder 101 ''
|
||||
if [[ -n "''${GHOSTTY_RESOURCES_DIR}" ]]; then
|
||||
builtin source "''${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
|
||||
fi
|
||||
'';
|
||||
|
||||
# try to make nautilus use this as the default gnome-console/gnome-terminal
|
||||
|
||||
|
||||
@@ -32,9 +32,15 @@
|
||||
|
||||
#programs.gh.enable = true; # adds read-only config to .config
|
||||
|
||||
#programs.git.gitui.enable = true;
|
||||
programs.git.enable = true;
|
||||
#programs.git.userName = "pbsds"
|
||||
programs.git.userName = "Peder Bergebakken Sundt";
|
||||
programs.git.userEmail = "pbsds@hotmail.com";
|
||||
|
||||
#programs.git.gitui.enable = true;
|
||||
|
||||
programs.git.lfs.enable = true;
|
||||
|
||||
programs.git.delta.enable = true;
|
||||
programs.git.delta.options = {
|
||||
# Delta uses ~/.gitconfig even when not invoked by git
|
||||
@@ -42,17 +48,12 @@
|
||||
max-line-length = 0;
|
||||
features.syntax-theme = lib.mkIf config.programs.bat.enable config.programs.bat.config.theme;
|
||||
};
|
||||
#programs.git.lfs.enable = true;
|
||||
#programs.git.userName = "pbsds"
|
||||
programs.git.userName = "Peder Bergebakken Sundt";
|
||||
programs.git.userEmail = "pbsds@hotmail.com";
|
||||
|
||||
# # sign commits with ssh key
|
||||
# programs.git.extraConfig.gpg.format = "ssh";
|
||||
# programs.git.signing.key = "${config.home.homeDirectory}/.ssh/my-key.pub";
|
||||
# programs.git.signing.signByDefault = true;
|
||||
|
||||
|
||||
# https://jvns.ca/blog/2024/02/16/popular-git-config-options/
|
||||
programs.git.extraConfig.rerere.enabled = true;
|
||||
#programs.git.extraConfig.help.autocorrect = "prompt";
|
||||
@@ -99,20 +100,11 @@
|
||||
#gcp = "git cherry-pick";
|
||||
gca = "git commit --amend";
|
||||
gcara = "git commit --amend --reset-author";
|
||||
gc = "git branch | cut -c2- | gum choose | xargs -n'\n' --no-run-if-empty git checkout";
|
||||
gc = "git branch | cut -c2- | gum choose | xargs -d'\n' --no-run-if-empty git checkout";
|
||||
gbrm = "git fetch origin; git branch --merged | cut -c3- | grep -vE '^(main|master)$' | gum choose --no-limit --header 'Which branches to delete:' | xargs -n'\n' --no-run-if-empty git branch -D";
|
||||
#gb = "git blame";
|
||||
#gpo = "git push origin";
|
||||
#gpf = "git push --force-with-lease --force-if-includes";
|
||||
|
||||
# TODO: use -c commit.template instead
|
||||
gcm = ''git commit --message "$(printf '%s\n' ${lib.concatStringsSep " " [
|
||||
''"$(curl -sL https://whatthecommit.com/index.txt)"''
|
||||
''""''
|
||||
''"$(curl -s 'https://printerfacts.cetacean.club/fact')"''
|
||||
''""''
|
||||
''"(made with https://whatthecommit.com/index.txt and https://printerfacts.cetacean.club/fact)"''
|
||||
]})"; git show --name-status; '';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
programs.bash.initExtra = ''
|
||||
if [ "$COLORTERM" = "truecolor" ] || [ "$TERM" == "xterm" ]; then
|
||||
export TERM=xterm-256color
|
||||
# export TERM=xterm-256color
|
||||
export MICRO_TRUECOLOR=1
|
||||
fi
|
||||
'';
|
||||
|
||||
@@ -81,14 +81,17 @@ in
|
||||
|
||||
# https://man.archlinux.org/man/extra/fzf/fzf.1.en#PREVIEW_WINDOW
|
||||
# bat is installed in bat.nix
|
||||
# this goes into home.sessionVariables.FZF_CTRL_T_OPTS which goes into a 'export ""' statement, i.e. it will eval bash variables
|
||||
#"--preview 'head {}'"
|
||||
# "--preview 'bat {}'"
|
||||
# "--preview 'tail -n$FZF_LINES {} | bat --file-name {} --paging never --style plain'"
|
||||
# "--preview 'tail -n\\$FZF_PREVIEW_LINES {} | bat --file-name {} --paging never --style plain'"
|
||||
# "--preview 'bat {} --paging never --style plain' --preview-window follow"
|
||||
"--preview 'if [[ -f {} ]]; then tail -n$FZF_LINES {} | bat --paging=never --style=plain --color=always --file-name {} ; elif [[ -e {}/.git ]]; then git -C {} status else file {} ; fi' --preview-window follow"
|
||||
"--preview 'if [[ -f {} ]]; then tail -n\\$FZF_PREVIEW_LINES {} | bat --paging=never --style=plain --color=always --file-name {} ; elif [[ -e {}/.git ]]; then git -C {} status else file {} ; fi' --preview-window follow"
|
||||
|
||||
# TODO: add viu to ^
|
||||
|
||||
# https://github.com/junegunn/fzf/discussions/3363#discussioncomment-6419463
|
||||
"--bind 'ctrl-a:reload:eval $FZF_DEFAULT_COMMAND --no-ignore'"
|
||||
"--bind 'ctrl-a:reload:eval \\$FZF_DEFAULT_COMMAND --no-ignore'"
|
||||
];
|
||||
|
||||
# ctrl-r
|
||||
@@ -147,6 +150,8 @@ in
|
||||
home.shellAliases.dush = "du -shc * | sort -h";
|
||||
home.shellAliases.dushd = "du -shc * .[!.]?* | sort -h";
|
||||
|
||||
home.shellAliases.icat = "viu";
|
||||
|
||||
home.shellAliases.open = "xdg-open";
|
||||
home.shellAliases.rwhich = mkArgsAlias ''which "$@" | xargs -d"\n" realpath --'';
|
||||
home.shellAliases.rwhichcd = mkArgsAlias ''
|
||||
@@ -214,7 +219,8 @@ in
|
||||
entr # live reload
|
||||
retry # retry command with optional backoff
|
||||
glances
|
||||
# bottom
|
||||
btop # better htop
|
||||
# bottom # better htop
|
||||
faketty
|
||||
# axel aria aria2 # brrr
|
||||
xe # better xargs
|
||||
@@ -222,14 +228,17 @@ in
|
||||
fd # better find
|
||||
# silver-searcher # 'ag'
|
||||
ripgrep # 'rg'
|
||||
# comby # ast-based rewrite
|
||||
fx # js tui viewer
|
||||
gron # grep-able json
|
||||
jq # json queries
|
||||
yq # includes xq (xml) and tomlq
|
||||
# comby # ast-based source code rewrite
|
||||
gron fastgron # grep-able json
|
||||
jq # json query
|
||||
# xq gojq # faster jq alternatives
|
||||
yq # jq wrapper with more formats, includes yq (yaml), xq (xml) and tomlq
|
||||
fx # jq tui viewer
|
||||
ijq # interactive jq
|
||||
#fq # jq for binaries
|
||||
xh # "friendly fast curl"
|
||||
htmlq # html css queries
|
||||
# mdq # markdown queries
|
||||
(pkgs.xan or null) # a jq for csv, zsv
|
||||
# xee # xml xpath queries
|
||||
pkgs.unstable.just # justfile
|
||||
@@ -244,6 +253,7 @@ in
|
||||
#xplr # tui file explorer
|
||||
aha # ansi colors to html
|
||||
(pkgs.colorized-logs or unstable.colorized-logs) # ansi2txt, pipetty
|
||||
viu # kitty icat/chafa alternative
|
||||
]);
|
||||
|
||||
home.file.".config/ncdu/config".text = ''
|
||||
|
||||
Reference in New Issue
Block a user