+Nushell
This commit is contained in:
parent
3d52c0576e
commit
32503965ab
@ -1,16 +1,25 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./fish.nix
|
||||
./fzf.nix
|
||||
./skim.nix
|
||||
./nitch.nix
|
||||
./nushell.nix
|
||||
./secrets.nix
|
||||
./starship.nix
|
||||
./zellij.nix
|
||||
];
|
||||
|
||||
programs.carapace = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
@ -27,6 +36,7 @@
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
nix-direnv.enable =
|
||||
true;
|
||||
};
|
||||
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.fzf;
|
||||
in {
|
||||
options.features.cli.fzf.enable = mkEnableOption "enable fuzzy finder";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
colors = {
|
||||
"fg" = "#f8f8f2";
|
||||
"bg" = "#282a36";
|
||||
"hl" = "#bd93f9";
|
||||
"fg+" = "#f8f8f2";
|
||||
"bg+" = "#44475a";
|
||||
"hl+" = "#bd93f9";
|
||||
"info" = "#ffb86c";
|
||||
"prompt" = "#50fa7b";
|
||||
"pointer" = "#ff79c6";
|
||||
"marker" = "#ff79c6";
|
||||
"spinner" = "#ffb86c";
|
||||
"header" = "#6272a4";
|
||||
};
|
||||
defaultOptions = [
|
||||
"--preview='bat --color=always -n {}'"
|
||||
"--bind 'ctrl-/:toggle-preview'"
|
||||
];
|
||||
defaultCommand = "fd --type f --exclude .git --follow --hidden";
|
||||
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
|
||||
};
|
||||
};
|
||||
}
|
81
home/features/cli/nushell.nix
Normal file
81
home/features/cli/nushell.nix
Normal file
@ -0,0 +1,81 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.nushell;
|
||||
in {
|
||||
options.features.cli.nushell.enable = mkEnableOption "enable nushell";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
plugins = with pkgs.nushellPlugins; [
|
||||
skim
|
||||
];
|
||||
envFile.text = ''
|
||||
$env.config.show_banner = false
|
||||
$env.NIX_PATH = "nixpkgs=channel:nixos-unstable"
|
||||
$env.NIX_LOG = "iunfo"
|
||||
$env.WEBKIT_DISABLE_COMPOSITING_MODE = "1"
|
||||
$env.TERMINAL = "kitty"
|
||||
$env.EDITOR = "nvim"
|
||||
$env.VISUAL = "zed"
|
||||
$env.XDG_DATA_HOME = $"($env.HOME)/.local/share"
|
||||
$env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden"
|
||||
$env.FZF_DEFAULT_OPTS = "
|
||||
--preview='bat --color=always -n {}'
|
||||
--preview-window up:3:hidden:wrap
|
||||
--bind 'ctrl-/:toggle-preview'
|
||||
--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'
|
||||
--color header:bold
|
||||
--header 'Press CTRL-Y to copy command into clipboard'"
|
||||
$env.FLAKE = $"($env.HOME)/p/nixos/nixos-config"
|
||||
'';
|
||||
configFile.text = ''
|
||||
#source /run/agenix/${config.home.username}-secrets
|
||||
|
||||
if (tty) == "/dev/tty1" {
|
||||
exec uwsm start -S -F /run/current-system/sw/bin/Hyprland
|
||||
}
|
||||
if (tty) == "/dev/tty2" {
|
||||
exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot
|
||||
}
|
||||
|
||||
alias .. = cd ..
|
||||
alias ... = cd ../..
|
||||
alias b = yazi
|
||||
alias lt = eza --tree --level=2 --long --icons --git
|
||||
alias grep = rg
|
||||
alias just = just --unstable
|
||||
alias fs = du -d 1 | sort-by apparent -r
|
||||
|
||||
alias n = nix
|
||||
alias nd = nix develop -c $nu.current-shell
|
||||
alias ns = nix shell
|
||||
alias nsn = nix shell nixpkgs#
|
||||
alias nb = nix build
|
||||
alias nbn = nix build nixpkgs#
|
||||
alias nf = nix flake
|
||||
|
||||
alias nr = sudo nixos-rebuild --flake .
|
||||
alias nrs = sudo nixos-rebuild switch --flake .#(sys host | get hostname)
|
||||
alias snr = sudo nixos-rebuild --flake .
|
||||
alias snrs = sudo nixos-rebuild --flake . switch
|
||||
alias hm = home-manager --flake .
|
||||
alias hms = home-manager --flake . switch
|
||||
alias hmr = do { cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch }
|
||||
|
||||
alias tsu = sudo tailscale up
|
||||
alias tsd = sudo tailscale down
|
||||
|
||||
alias vi = nvim
|
||||
alias vim = nvim
|
||||
|
||||
def h [] { ^nu -c (history | get command | uniq | sk) }
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
23
home/features/cli/skim.nix
Normal file
23
home/features/cli/skim.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.features.cli.skim;
|
||||
in {
|
||||
options.features.cli.skim.enable = mkEnableOption "enable skim fuzzy finder";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.skim = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
defaultOptions = [
|
||||
"--preview='bat --color=always -n {}'"
|
||||
"--bind 'ctrl-/:toggle-preview'"
|
||||
];
|
||||
defaultCommand = "fd --type f --exclude .git --follow --hidden";
|
||||
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
|
||||
};
|
||||
};
|
||||
}
|
@ -12,6 +12,7 @@ in {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -128,9 +128,9 @@
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
"$mainMod, return, exec, kitty -e zellij-ps"
|
||||
"$mainMod, return, exec, nu -c zellij-ps"
|
||||
# "$mainMod, t, exec, warp-terminal"
|
||||
"$mainMod, t, exec, kitty -e fish -c 'nitch; exec fish'"
|
||||
"$mainMod, t, exec, kitty -e nu -c 'nitch; exec nu'"
|
||||
"$mainMod SHIFT, t, exec, launch-timer"
|
||||
"$mainMod SHIFT, e, exec, kitty -e zellij_nvim"
|
||||
"$mainMod, o, exec, hyprctl setprop activewindow opaque toggle"
|
||||
|
@ -26,7 +26,7 @@ in {
|
||||
kdePackages.kdenlive
|
||||
krita
|
||||
libation
|
||||
makemkv
|
||||
#makemkv
|
||||
pamixer
|
||||
pavucontrol
|
||||
qpwgraph
|
||||
|
@ -100,6 +100,17 @@
|
||||
init.defaultBranch = "master";
|
||||
};
|
||||
};
|
||||
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
email = "m@m3tam3re.com";
|
||||
name = "Sascha Koenig";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
|
@ -49,7 +49,8 @@ in {
|
||||
features = {
|
||||
cli = {
|
||||
fish.enable = true;
|
||||
fzf.enable = true;
|
||||
nushell.enable = true;
|
||||
skim.enable = true;
|
||||
nitch.enable = true;
|
||||
secrets.enable = true;
|
||||
starship.enable = true;
|
||||
|
@ -70,5 +70,5 @@
|
||||
((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
nixPath = ["/etc/nix/path"];
|
||||
};
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
users.defaultUserShell = pkgs.nushell;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user