From 4fae84562dcbbbb152e27d968beed6a002975c59 Mon Sep 17 00:00:00 2001 From: cswimr Date: Fri, 22 Nov 2024 09:07:36 -0500 Subject: [PATCH] switch to `fish` from `zsh` --- flake.nix | 2 +- nixos/{zsh.nix => shell.nix} | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) rename nixos/{zsh.nix => shell.nix} (86%) diff --git a/flake.nix b/flake.nix index 1b4f76b..4f75ab4 100644 --- a/flake.nix +++ b/flake.nix @@ -49,9 +49,9 @@ ./nixos/nvidia.nix ./nixos/nvim.nix ./nixos/pkg.nix + ./nixos/shell.nix ./nixos/sudo.nix ./nixos/tailscale.nix - ./nixos/zsh.nix { # enable bluetooth diff --git a/nixos/zsh.nix b/nixos/shell.nix similarity index 86% rename from nixos/zsh.nix rename to nixos/shell.nix index 6ada049..a7ac7c9 100755 --- a/nixos/zsh.nix +++ b/nixos/shell.nix @@ -57,21 +57,14 @@ add_newline = false; }; }; - users.defaultUserShell = pkgs.zsh; - programs.zsh = { + users.defaultUserShell = pkgs.fish; + programs.fish = { enable = true; - enableCompletion = true; - enableBashCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; shellInit = '' export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin" ''; - histSize = 10000; - histFile = "$HOME/.zsh_history"; - - shellAliases = let ezaArgs = "--time-style='+%Y-%m-%d %H:%M' --icons"; + shellAliases = let ezaArgs = "--time-style='+%Y-%m-%d %H:%M' --icons=auto"; in { ff = "fastfetch"; neofetch = "fastfetch"; @@ -90,12 +83,15 @@ ls = "eza ${ezaArgs}"; lsa = "eza -lah ${ezaArgs}"; tree = "eza --tree --git-ignore ${ezaArgs}"; + git = "hub"; create-devenv = "nix flake init --template github:cachix/devenv && direnv allow"; develop = "nix develop --no-pure-eval"; + nixpkgs-update = "nix run --option extra-substituters 'https://nix-community.cachix.org/' --option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' github:ryantm/nixpkgs-update --"; nixrc = "$EDITOR /etc/nixos"; + delete-vscode-settings-backup = "rm -rf ~/.config/Code/User/settings.json.bak"; upd = - "sudo nixos-generate-config --dir /etc/nixos/hosts && sudo rm /etc/nixos/hosts/configuration.nix && sudo mv /etc/nixos/hosts/hardware-configuration.nix /etc/nixos/hosts/$(hostname).nix && git -C /etc/nixos --git-dir=/etc/nixos/.git add /etc/nixos/hosts/$(hostname).nix && sudo nixos-rebuild switch"; + "sudo nixos-generate-config --dir /etc/nixos/hosts && sudo rm /etc/nixos/hosts/configuration.nix && sudo mv /etc/nixos/hosts/hardware-configuration.nix /etc/nixos/hosts/$(hostname).nix && git -C /etc/nixos --git-dir=/etc/nixos/.git add /etc/nixos/hosts/$(hostname).nix && delete-vscode-settings-backup && sudo nixos-rebuild switch --flake /etc/nixos"; taildrop = "tailscale file";