From 1f70a57e1171b58700b7544fc1952ca97b673e0b Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Wed, 2 Jul 2025 17:48:27 +0800 Subject: [PATCH] feat(homes/rafiq): switch to fish shell --- homes/x86_64-linux/rafiq/cli/shell.nix | 19 ++----------------- modules/nixos/default.nix | 5 +++++ systems/x86_64-linux/common.nix | 15 +++------------ 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/homes/x86_64-linux/rafiq/cli/shell.nix b/homes/x86_64-linux/rafiq/cli/shell.nix index 023d552..5f138e4 100644 --- a/homes/x86_64-linux/rafiq/cli/shell.nix +++ b/homes/x86_64-linux/rafiq/cli/shell.nix @@ -7,23 +7,8 @@ let in { home.shell.enableShellIntegration = true; - #TODO: change to fish - home.sessionVariables.SHELL = "zsh"; - programs.zsh = { - enable = true; - enableVteIntegration = true; - syntaxHighlighting.enable = true; - historySubstringSearch.enable = true; - history = { - append = true; - extended = true; - ignoreDups = true; - ignoreSpace = true; - save = 10000; - share = true; - size = 10000; - }; - }; + home.sessionVariables.SHELL = "fish"; + programs.fish.enable = true; programs.zsh.initContent = mkOrder 1200 # zsh diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index cfb3cea..3498a97 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -11,6 +11,7 @@ let str coercedTo submodule + shellPackage ; inherit (lib.pantheon) mkStrOption; inherit (lib.snowfall.fs) get-file; @@ -43,6 +44,9 @@ in name = mkStrOption; publicKey = mkStrOption; email = mkStrOption; + shell = mkOption { + type = shellPackage; + }; }; persistDirs = mkOption { type = listOf (coercedTo str (d: { directory = d; }) rootDir); @@ -78,6 +82,7 @@ in members = [ "${config.mainUser.name}" ]; }; users."${config.mainUser.name}" = { + inherit (config.mainUser) shell; uid = 1000; isNormalUser = true; hashedPasswordFile = config.sops.secrets."${config.mainUser.name}/hashedPassword".path; diff --git a/systems/x86_64-linux/common.nix b/systems/x86_64-linux/common.nix index 618f952..0954fff 100644 --- a/systems/x86_64-linux/common.nix +++ b/systems/x86_64-linux/common.nix @@ -1,22 +1,13 @@ { pkgs, ... }: -let - inherit (pkgs) zsh; -in { mainUser = { name = "rafiq"; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n"; email = "rafiq@rrv.sh"; + shell = pkgs.fish; }; server.mountHelios = true; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml"; - users.defaultUserShell = zsh; - programs = { - zsh.enable = true; - zsh.enableCompletion = true; - nix-ld = { - enable = true; - libraries = with pkgs; [ ]; - }; - }; + programs.fish.enable = true; + programs.nix-ld.enable = true; }