diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-04 14:13:24 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-04 14:13:24 +0200 |
| commit | 7ab57a27c9648b3a8e12f755e03fc84eb50291b4 (patch) | |
| tree | 973ab147758398dae0101afaba18d9ef4a36c4b4 /home/nushell.nix | |
| parent | 6abfa6e06fdbe41702db89024aa25b1dee242a27 (diff) | |
| download | nixos-7ab57a27c9648b3a8e12f755e03fc84eb50291b4.tar.zst | |
Add home applications to separate files
Diffstat (limited to 'home/nushell.nix')
| -rw-r--r-- | home/nushell.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/home/nushell.nix b/home/nushell.nix new file mode 100644 index 0000000..b6d9034 --- /dev/null +++ b/home/nushell.nix @@ -0,0 +1,54 @@ +{ pkgs, ... }: + +{ + programs.nushell = { + enable = true; + shellAliases = { + browser = "${pkgs.chawan}/bin/cha"; + cat = "${pkgs.gat}/bin/gat"; + fj = "${pkgs.forgejo-cli}/bin/fj --host git.relesoft.io"; + gmail = "${pkgs.himalaya}/himalaya envelope list --account gmail --folder gmail/Inbox 'not flag Seen'"; + grep = "${pkgs.ripgrep}/bin/rg"; + http = "${pkgs.xh}/bin/xh"; + journalctl = "${pkgs.systemd}/bin/journalctl --output=short-iso"; + llm = "${pkgs.tenere}/bin/tenere"; + lt = "${pkgs.eza}/bin/eza --tree --level=2 --long --icons --git"; + relesoft = "${pkgs.himalaya}/himalaya envelope list --account relesoft --folder relesoft/Inbox 'not flag Seen'"; + stocks = "${pkgs.ticker}/bin/ticker --config /home/petri/.config/ticker/config.yaml"; + weather = "${pkgs.wthrr}/bin/wthrr --forecast d"; + wifi = "${pkgs.impala}/bin/impala"; + youtube = "${pkgs.pipe-viewer}/bin/pipe-viewer"; + }; + extraConfig = '' + def ns [] { + ${pkgs.nix-search-tv}/bin/nix-search-tv print | ${pkgs.fzf}/bin/fzf --preview "${pkgs.nix-search-tv}/bin/nix-search-tv preview {}" --scheme history + } + + def doc [file: path] { + ${pkgs.asciidoctor}/bin/asciidoctor --backend xhtml5 --out-file - $file | + ${pkgs.chawan}/bin/cha -T application/xhtml+xml + } + + def share [file: path] { + ${pkgs.curl}/bin/curl -X PUT --data-binary @$file https://bin.tammi.cc + } + + def import [...files] { + ${pkgs.grim}/bin/grim -g ${pkgs.slurp}/bin/slurp $files + } + + def readdoc [...args] { + ${pkgs.reader}/bin/reader $args --markdown-output | ${pkgs.moor}/bin/moor --wrap --lang markdown + } + ''; + settings = { + show_banner = false; + completions = { + case_sensitive = false; + quick = true; + partial = true; + algorithm = "fuzzy"; + }; + }; + }; +} |
