From 466697be14c2939b68831b5f0381fc3ef85680e9 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Fri, 14 Mar 2025 13:33:14 +0800 Subject: [PATCH] feat: add zsh as default shell --- systems/modules/common.nix | 6 ++++++ systems/modules/programs/zsh.nix | 7 +++++++ systems/modules/shell.nix | 5 +++++ systems/nemesis.nix | 4 +--- systems/orpheus.nix | 2 -- users/modules/programs/zsh.nix | 8 ++++++++ users/modules/sh.nix | 2 +- 7 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 systems/modules/programs/zsh.nix create mode 100644 systems/modules/shell.nix create mode 100644 users/modules/programs/zsh.nix diff --git a/systems/modules/common.nix b/systems/modules/common.nix index 17fa940..41d38e9 100644 --- a/systems/modules/common.nix +++ b/systems/modules/common.nix @@ -1,4 +1,10 @@ {pkgs, ...}: { + imports = [ + ./networking.nix + ./shell.nix + ./stylix.nix + ]; + users.users.rafiq = { isNormalUser = true; description = "rafiq"; diff --git a/systems/modules/programs/zsh.nix b/systems/modules/programs/zsh.nix new file mode 100644 index 0000000..ec02aba --- /dev/null +++ b/systems/modules/programs/zsh.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + programs.zsh = { + enable = true; + }; + users.defaultUserShell = pkgs.zsh; + environment.pathsToLink = ["/share/zsh"]; # enables completion +} diff --git a/systems/modules/shell.nix b/systems/modules/shell.nix new file mode 100644 index 0000000..ce02d0a --- /dev/null +++ b/systems/modules/shell.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./programs/zsh.nix + ]; +} diff --git a/systems/nemesis.nix b/systems/nemesis.nix index f29c440..4063de4 100644 --- a/systems/nemesis.nix +++ b/systems/nemesis.nix @@ -1,12 +1,10 @@ { imports = [ ./hw-nemesis.nix - ./modules/bootloaders/systemd-boot.nix ./modules/common.nix ./modules/desktop.nix + ./modules/bootloaders/systemd-boot.nix ./modules/hardware/nvidia.nix - ./modules/networking.nix - ./modules/stylix.nix ]; networking.hostName = "nemesis"; diff --git a/systems/orpheus.nix b/systems/orpheus.nix index e6f7140..eb3fa4a 100644 --- a/systems/orpheus.nix +++ b/systems/orpheus.nix @@ -3,8 +3,6 @@ ./hw-orpheus.nix ./modules/bootloaders/extlinux.nix ./modules/common.nix - ./modules/networking.nix - ./modules/stylix.nix inputs.nixos-hardware.nixosModules.raspberry-pi-4 "${inputs.nixpkgs}/nixos/modules/profiles/minimal.nix" ]; diff --git a/users/modules/programs/zsh.nix b/users/modules/programs/zsh.nix new file mode 100644 index 0000000..21d495b --- /dev/null +++ b/users/modules/programs/zsh.nix @@ -0,0 +1,8 @@ +{ + programs.zsh = { + enable = true; + enableCompletion = true; + enableVteIntegration = true; + # TODO: Look into whether we need to add the history attribute + }; +} diff --git a/users/modules/sh.nix b/users/modules/sh.nix index 0be6b17..9b5cc07 100644 --- a/users/modules/sh.nix +++ b/users/modules/sh.nix @@ -1,7 +1,6 @@ # Default shell utilities and programs { imports = [ - ./programs/bash.nix ./programs/btop.nix ./programs/direnv.nix ./programs/fzf.nix @@ -11,6 +10,7 @@ ./programs/tealdeer.nix ./programs/tmux.nix ./programs/yazi.nix + ./programs/zsh.nix ./scripts ]; }