zsh configured

This commit is contained in:
Semere Meharena Mebrahtom 2026-07-19 03:23:56 +02:00
parent 3e14a0acb8
commit 2272e5efd8
Signed by: semere
GPG key ID: 7FC937214DF30488
4 changed files with 259 additions and 14 deletions

71
modules/shell/default.nix Normal file
View file

@ -0,0 +1,71 @@
{ config, lib, pkgs, userVars, ... }:
let
cfg = config.dotfiles.shell;
shellDir = ./.;
otherShellFiles = builtins.filter
(name: name != "default.nix" && lib.strings.hasSuffix ".nix" name)
(builtins.attrNames (builtins.readDir shellDir));
importedModules = map (file: shellDir + "/${file}") otherShellFiles;
in
{
imports = importedModules;
options.dotfiles.shell = {
enable = lib.mkEnableOption "Shell, Git, GPG, and CLI environment";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
git
wget
tealdeer
gnupg
pass
p7zip
btop
helix
opencode
fd
ripgrep
];
home-manager.users."${userVars.username}" = {
programs.git = {
enable = true;
settings = {
user = {
name = userVars.fullName;
email = userVars.email;
};
commit.gpgsign = true;
gpg.program = "gpg";
};
signing = {
key = userVars.gpgKey;
signByDefault = true;
};
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
pinentry.package = pkgs.pinentry-curses;
};
programs.helix = {
enable = true;
defaultEditor = true;
settings = {
theme = "ayu_dark";
editor = {
line-number = "relative";
lsp.display-messages = true;
};
};
};
};
};
}