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";