commit ee8bac7cf575f28a653e32c7e812a8b5eff326b8
parent d980e43eecf8c9aa0c62c7eb42ad2fd5f0d32b36
Author: breadcat <breadcat@users.noreply.github.com>
Date: Tue, 5 Aug 2025 17:56:22 +0100
Domain variable and install fzf if missing
Diffstat:
5 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/home/fish.nix b/home/fish.nix
@@ -1,16 +1,23 @@
{
+ pkgs,
+ domain,
+ ...
+}:
+
+{
programs.fish = {
enable = true;
functions = {
__fish_command_not_found_handler = { body = "echo fish: Unknown command $argv[1]"; onEvent = "fish_command_not_found"; };
vat = "math $argv + \"($argv * 0.2)\"";
mcd = "mkdir -p $argv[1] && cd $argv[1]";
- mergeinto = "rsync --progress --remove-source-files -av \"$argv[1]\" \"$argv[2]\" && find \"$argv[1]\" -empty -delete";
+ mergeinto = "rsync --progress --remove-source-files -av \"$argv[1]\" \"$argv[2]\" && find \"$argv[1]\" -empty -delete";
+ book = "grep -i \"$argv\" \"$SYNCDIR/src/blog.${domain}/content/reading-list.md\"";
};
loginShellInit = ''
set fish_greeting # Disable greeting
set --erase fish_greeting # Disable greeting
- set -gx DOMAIN minskio.co.uk
+ set -gx DOMAIN ${domain}
set -gx SYNCDIR $HOME/vault
set -gx EDITOR nvim
set -gx VISUAL $EDITOR
@@ -19,12 +26,12 @@
extract = "aunpack";
jdupes = "jdupes -A"; # exclude hidden files
empties = "find . -maxdepth 3 -mount -not -path \"*/\.*\" -empty -print";
- vaultedit = "find \"$SYNCDIR\" -maxdepth 5 -type f | fzf --preview \"cat {}\" --layout reverse | xargs -r -I{} \"$EDITOR\" {}";
+ vaultedit = "find \"$SYNCDIR\" -maxdepth 5 -type f | ${pkgs.fzf}/bin/fzf --preview \"cat {}\" --layout reverse | xargs -r -I{} \"$EDITOR\" {}";
week = "date +%V";
};
-# binds = {
-# "ctrl-h".command = "backward-kill-path-component";
-# "ctrl-backspace".command = "kill-word";
-# };
+ # binds = {
+ # "ctrl-h".command = "backward-kill-path-component";
+ # "ctrl-backspace".command = "kill-word";
+ # };
};
}
diff --git a/machines/arcadia.nix b/machines/arcadia.nix
@@ -30,7 +30,7 @@ in
home-manager.backupFileExtension = "hm-bak";
home-manager.users.${username} = { pkgs, ... }: {
imports = [
- ../home/fish.nix
+ (import ../home/fish.nix {inherit pkgs domain;})
../home/hyprland.nix
../home/ghostty.nix
(import ../home/kodi.nix {inherit username;})
diff --git a/machines/artemis.nix b/machines/artemis.nix
@@ -40,7 +40,7 @@ in {
home-manager.backupFileExtension = "hm-bak";
home-manager.users.${username} = {pkgs, ...}: {
imports = [
- ../home/fish.nix
+ (import ../home/fish.nix {inherit pkgs domain;})
(import ../home/git.nix {inherit fullname email;})
../home/htop.nix
../home/neovim.nix
diff --git a/machines/ilias.nix b/machines/ilias.nix
@@ -55,7 +55,7 @@ in {
home-manager.backupFileExtension = "hm-bak";
home-manager.users.${username} = {pkgs, ...}: {
imports = [
- ../home/fish.nix
+ (import ../home/fish.nix {inherit pkgs domain;})
(import ../home/git.nix {inherit fullname email;})
../home/htop.nix
../home/neovim.nix
diff --git a/machines/minerva.nix b/machines/minerva.nix
@@ -39,7 +39,7 @@ in {
home-manager.backupFileExtension = "hm-bak";
home-manager.users.${username} = {pkgs, ...}: {
imports = [
- ../home/fish.nix
+ (import ../home/fish.nix {inherit pkgs domain;})
../home/ghostty.nix
../home/cursor.nix
../home/firefox.nix