From ea4cfea1751ebb86bd70bee28aa4bec09a5d6dd2 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 4 Aug 2024 11:47:57 -0400 Subject: [PATCH] home: bash -> shell + zsh + oh-my-posh aly: switch to zsh --- homeManagerModules/apps/default.nix | 4 ++-- .../apps/{bash => shell}/default.nix | 22 ++++++++++++++++++- homeManagerModules/options.nix | 3 +-- homes/aly/default.nix | 9 ++------ homes/dustin/default.nix | 8 ++----- userModules/aly/default.nix | 2 ++ userModules/default.nix | 2 ++ 7 files changed, 32 insertions(+), 18 deletions(-) rename homeManagerModules/apps/{bash => shell}/default.nix (67%) diff --git a/homeManagerModules/apps/default.nix b/homeManagerModules/apps/default.nix index 9a4f9a6f..afeaf7d0 100644 --- a/homeManagerModules/apps/default.nix +++ b/homeManagerModules/apps/default.nix @@ -2,18 +2,18 @@ imports = [ ./alacritty ./backblaze - ./bash ./chromium ./emacs ./fastfetch ./firefox ./fuzzel ./helix - ./kitty ./keepassxc + ./kitty ./librewolf ./nemo ./rofi + ./shell ./swaylock ./thunar ./tmux diff --git a/homeManagerModules/apps/bash/default.nix b/homeManagerModules/apps/shell/default.nix similarity index 67% rename from homeManagerModules/apps/bash/default.nix rename to homeManagerModules/apps/shell/default.nix index 32bc73f1..7b38452e 100644 --- a/homeManagerModules/apps/bash/default.nix +++ b/homeManagerModules/apps/shell/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: { - config = lib.mkIf config.ar.home.apps.bash.enable { + config = lib.mkIf config.ar.home.apps.shell.enable { home.shellAliases = { cat = lib.getExe pkgs.bat; grep = lib.getExe config.programs.ripgrep.package; @@ -45,10 +45,30 @@ tmux.enableShellIntegration = true; }; + oh-my-posh = { + enable = true; + useTheme = "zash"; + }; + ripgrep = { enable = true; arguments = ["--pretty"]; }; + + zsh = { + enable = true; + autocd = true; + autosuggestion.enable = true; + enableCompletion = true; + enableVteIntegration = true; + historySubstringSearch.enable = true; + + history = { + expireDuplicatesFirst = true; + extended = true; + ignoreAllDups = true; + }; + }; }; }; } diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index 496f7d5d..ca1b1f9a 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -27,8 +27,6 @@ in { }; }; - bash.enable = lib.mkEnableOption "Bash defaults."; - chromium = { enable = lib.mkEnableOption "Chromium-based browser with default extensions."; package = lib.mkPackageOption pkgs "brave" {}; @@ -61,6 +59,7 @@ in { }; rofi.enable = lib.mkEnableOption "Rofi launcher."; + shell.enable = lib.mkEnableOption "Shell with defaults."; swaylock.enable = lib.mkEnableOption "Swaylock screen locker."; thunar.enable = lib.mkOption { diff --git a/homes/aly/default.nix b/homes/aly/default.nix index 4b5048a9..7f53fbfe 100644 --- a/homes/aly/default.nix +++ b/homes/aly/default.nix @@ -54,7 +54,7 @@ in { extraConfig = { color.ui = true; - core.editor = "${lib.getExe unstable.zed-editor} --wait"; + core.editor = "${lib.getExe config.programs.vscode.package} --wait"; github.user = "alyraffauf"; push.autoSetupRemote = true; }; @@ -63,11 +63,6 @@ in { gitui.enable = true; home-manager.enable = true; - oh-my-posh = { - enable = true; - useTheme = "zash"; - }; - rbw = { enable = true; package = pkgs.rbw; @@ -90,13 +85,13 @@ in { keyFile = config.age.secrets.backblazeKey.path; }; - bash.enable = true; chromium.enable = true; fastfetch.enable = true; firefox.enable = true; helix.enable = true; keepassxc.enable = true; kitty.enable = true; + shell.enable = true; tmux.enable = true; vsCodium.enable = true; yazi.enable = true; diff --git a/homes/dustin/default.nix b/homes/dustin/default.nix index fac11a4a..fed0c5c1 100644 --- a/homes/dustin/default.nix +++ b/homes/dustin/default.nix @@ -3,11 +3,7 @@ self: { lib, pkgs, ... -}: let - unstable = import self.inputs.nixpkgs-unstable { - system = pkgs.system; - }; -in { +}: { imports = [self.homeManagerModules.default]; home = { @@ -64,10 +60,10 @@ in { ar.home = { apps = { - bash.enable = true; chromium.enable = true; firefox.enable = true; kitty.enable = true; + shell.enable = true; vsCodium.enable = true; }; diff --git a/userModules/aly/default.nix b/userModules/aly/default.nix index c6e47651..d3e8633b 100644 --- a/userModules/aly/default.nix +++ b/userModules/aly/default.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, self, ... }: { @@ -29,6 +30,7 @@ ]; }; + shell = pkgs.zsh; uid = 1000; }; }; diff --git a/userModules/default.nix b/userModules/default.nix index 365ac812..8cc90bc3 100644 --- a/userModules/default.nix +++ b/userModules/default.nix @@ -5,6 +5,8 @@ self: { ./options.nix ]; + programs.zsh.enable = true; + users = { mutableUsers = false;