This commit is contained in:
Rasyidan Akbar F. 2025-09-26 15:50:15 +07:00
commit bcbd699c4c
11 changed files with 786 additions and 124 deletions

410
flake.lock generated Normal file
View file

@ -0,0 +1,410 @@
{
"nodes": {
"crane": {
"locked": {
"lastModified": 1753316655,
"narHash": "sha256-tzWa2kmTEN69OEMhxFy+J2oWSvZP5QhEgXp3TROOzl0=",
"owner": "ipetkov",
"repo": "crane",
"rev": "f35a3372d070c9e9ccb63ba7ce347f0634ddf3d2",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758447883,
"narHash": "sha256-yGA6MV0E4JSEXqLTb4ZZkmdJZcoQ8HUzihRRX12Bvpg=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "25381509d5c91bbf3c30e23abc6d8476d2143cd1",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"fff": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nvim-bundle",
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1758042756,
"narHash": "sha256-mCeEse1rY1T04TE6OqeOGP4Mlvk1aHc1N2q1njc93fI=",
"owner": "dmtrKovalenko",
"repo": "fff.nvim",
"rev": "3a803c40edf24dcb6b51ef40aeb4210d4c7a0dd3",
"type": "github"
},
"original": {
"owner": "dmtrKovalenko",
"repo": "fff.nvim",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"ghostty": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"zig": "zig",
"zon2nix": "zon2nix"
},
"locked": {
"lastModified": 1758770678,
"narHash": "sha256-iVld1O+ZlJckcVgGZs53TuGdQvCz6crAtRKeAAZfyY8=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "dbbff53af7aec09ad5cb76b258a0cd1637e48408",
"type": "github"
},
"original": {
"owner": "ghostty-org",
"repo": "ghostty",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758873997,
"narHash": "sha256-hQ/4jOgnYjPJjfih1rYg24mgCnImTho9Y8B953004JA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b91c7e43ed7ee644b032b068343472a48c703a10",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"neovim": {
"flake": false,
"locked": {
"lastModified": 1758080187,
"narHash": "sha256-J0WfqbIK1ftH3x/McoNTwBOZfuRtLvwq8r0xHNZyDwo=",
"owner": "neovim",
"repo": "neovim",
"rev": "63ece2b151e3d051d9366452441f64430ae5b45e",
"type": "github"
},
"original": {
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"nix-appimage": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nvim-bundle",
"nixpkgs"
]
},
"locked": {
"lastModified": 1757920913,
"narHash": "sha256-jd0QwCVz4O1sHHkeaZILD/7D6oyalceEJ4EFnWCgm0k=",
"owner": "ralismark",
"repo": "nix-appimage",
"rev": "7946addbc0d97e358a6d7aefe5e82310f0fe6b18",
"type": "github"
},
"original": {
"owner": "ralismark",
"repo": "nix-appimage",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1758360447,
"narHash": "sha256-XDY3A83bclygHDtesRoaRTafUd80Q30D/Daf9KSG6bs=",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre864002.8eaee1103447/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1758690382,
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nvim-bundle": {
"inputs": {
"fff": "fff",
"neovim": "neovim",
"nix-appimage": "nix-appimage",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758121216,
"narHash": "sha256-qlmlULV0L29ZCaH0dRITkGwifoFQ3rOkADgraMlEOqM=",
"owner": "jla2000",
"repo": "nvim-bundle",
"rev": "84613d125941e5ff8c3b352f0d91fed2ed6cb9de",
"type": "github"
},
"original": {
"owner": "jla2000",
"repo": "nvim-bundle",
"type": "github"
}
},
"root": {
"inputs": {
"darwin": "darwin",
"ghostty": "ghostty",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"nvim-bundle": "nvim-bundle"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nvim-bundle",
"fff",
"nixpkgs"
]
},
"locked": {
"lastModified": 1756866691,
"narHash": "sha256-YWJsM0HfdFLcaoP5OeyzjX6MjGnJ0Acm+bg1QN8MKjo=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fb6dab6f320291a8edd31c1d67f078c6f7384a02",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": [
"ghostty",
"flake-compat"
],
"flake-utils": [
"ghostty",
"flake-utils"
],
"nixpkgs": [
"ghostty",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748261582,
"narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "aafb1b093fb838f7a02613b719e85ec912914221",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zon2nix": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1758405547,
"narHash": "sha256-WgaDgvIZMPvlZcZrpPMjkaalTBnGF2lTG+62znXctWM=",
"owner": "jcollie",
"repo": "zon2nix",
"rev": "bf983aa90ff169372b9fa8c02e57ea75e0b42245",
"type": "github"
},
"original": {
"owner": "jcollie",
"repo": "zon2nix",
"rev": "bf983aa90ff169372b9fa8c02e57ea75e0b42245",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -2,32 +2,29 @@
description = "Rasyid's nix-darwin dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
darwin.url = "github:LnL7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
ghostty.url = "github:ghostty-org/ghostty";
ghostty.inputs.nixpkgs.follows = "nixpkgs";
nvim-bundle.url = "github:jla2000/nvim-bundle";
nvim-bundle.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, darwin, home-manager, ghostty, ... }:
outputs = inputs@{ self, nixpkgs, darwin, home-manager, ghostty, ... }:
let
inherit (nixpkgs.lib) genAttrs;
systems = [
"aarch64-darwin"
"x86_64-darwin"
];
systems = [ "aarch64-darwin" "x86_64-darwin" ];
forEachSystem = f: genAttrs systems (system: f system);
overlaysList =
[ ghostty.overlays.default ];
overlaysList = [ ghostty.overlays.default ];
mkPkgs = system:
import nixpkgs {
@ -36,33 +33,17 @@
config.allowUnfree = true;
};
mkPkgsUnstable = system:
import nixpkgs-unstable {
inherit system;
overlays = overlaysList;
config.allowUnfree = true;
};
sharedModules = [
./modules/darwin/system.nix
];
sharedModules = [ ./modules/darwin/system.nix ];
user = "rsydn";
mkDarwin = { hostname, system ? "aarch64-darwin", extraModules ? [ ], homeFile ? ./modules/home/rsydn/base.nix }:
let
pkgs = mkPkgs system;
pkgsUnstable = mkPkgsUnstable system;
in
darwin.lib.darwinSystem {
mkDarwin = { system ? "aarch64-darwin", extraModules ? [ ]
, homeFile ? ./modules/home/rsydn/base.nix }:
let pkgs = mkPkgs system;
in darwin.lib.darwinSystem {
inherit system pkgs;
specialArgs = {
inherit inputs overlaysList pkgsUnstable user;
};
modules =
sharedModules
++ extraModules
++ [
specialArgs = { inherit inputs overlaysList user; };
modules = sharedModules ++ extraModules ++ [
home-manager.darwinModules.home-manager
{
nix.registry.self.flake = self;
@ -72,30 +53,19 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs pkgsUnstable user;
};
home-manager.extraSpecialArgs = { inherit inputs user; };
home-manager.users.${user} = import homeFile;
}
];
};
in {
darwinConfigurations = {
macbook-pro = mkDarwin {
hostname = "macbook-pro";
};
};
darwinConfigurations = { macbook-pro = mkDarwin { }; };
devShells = forEachSystem (system:
let
pkgs = mkPkgs system;
pkgsUnstable = mkPkgsUnstable system;
let pkgs = mkPkgs system;
in {
default = pkgs.mkShell {
packages = with pkgs; [
git
nixfmt-classic
];
packages = with pkgs; [ git nixfmt-classic ];
shellHook = ''
echo "Loaded default shell for ${system}"
'';
@ -105,8 +75,6 @@
formatter = forEachSystem (system: (mkPkgs system).nixfmt-classic);
packages = forEachSystem (system: {
inherit (mkPkgs system) git;
});
packages = forEachSystem (system: { inherit (mkPkgs system) git; });
};
}

View file

@ -0,0 +1,48 @@
{ config, pkgs, lib, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.rsydn.systemPackages;
in {
options.rsydn.systemPackages = {
enable = mkOption {
type = types.bool;
default = true;
description = "Enable system-wide development packages.";
};
packages = mkOption {
type = types.listOf types.package;
default = with pkgs; [
ast-grep
duckdb
ffmpeg
fzf
go
htop
jetbrains-mono
jq
lazydocker
lazygit
lorri
neovim
pandoc
postgresql_18
python312
python312Packages.uv
ripgrep
rustc
rustup
tree
vim
yq
tmux
tailscale
sqlite
wget
];
description = "System packages to install for development tooling.";
};
};
config = mkIf cfg.enable { environment.systemPackages = cfg.packages; };
}

View file

@ -0,0 +1,66 @@
{ config, lib, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.rsydn.homebrew;
in {
options.rsydn.homebrew = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to manage Homebrew declaratively.";
};
taps = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Homebrew taps to add.";
};
brews = mkOption {
type = types.listOf types.str;
default = [
"curl"
"yt-dlp"
"nodejs"
"charmbracelet/tap/crush"
"sst/tap/opencode"
"ruff"
"libmagic"
"ghostscript"
"infisical"
"fastfetch"
];
description = "Homebrew formulae to install.";
};
casks = mkOption {
type = types.listOf types.str;
default = [
"bitwarden"
"chromium"
"dbngin"
"pgadmin14"
"docker-desktop"
"spotify"
"discord"
"obs"
"neohtop"
"orbstack"
"visual-studio-code"
"google-chrome@canary"
"mactex"
];
description = "Homebrew casks to install.";
};
};
config = mkIf cfg.enable {
homebrew = {
enable = true;
global.autoUpdate = false;
onActivation = {
autoUpdate = false;
cleanup = "zap";
upgrade = false;
};
inherit (cfg) taps brews casks;
};
};
}

50
modules/darwin/system.nix Normal file
View file

@ -0,0 +1,50 @@
{ config, pkgs, lib, ... }: {
imports = [ ./homebrew.nix ./devtools.nix ];
services.nix-daemon.enable = true;
nix = {
package = pkgs.nix;
extraOptions = ''
keep-derivations = true
keep-outputs = true
'';
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
warn-dirty = false;
};
gc = {
automatic = true;
interval = {
Weekday = 0;
Hour = 3;
Minute = 30;
};
options = "--delete-older-than 30d";
};
};
system = {
stateVersion = "24.05";
defaults = {
NSGlobalDomain = {
ApplePressAndHoldEnabled = false;
KeyRepeat = 2;
InitialKeyRepeat = 15;
};
dock = {
autohide = true;
show-recents = false;
tilesize = 48;
};
finder = {
AppleShowAllExtensions = true;
AppleShowAllFiles = true;
};
};
};
security.pam.enableSudoTouchIdAuth = true;
}

View file

@ -1,70 +1,22 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
imports = [
./programs/helix.nix
./programs/neovim.nix
./shell/zsh.nix
./shell/tmux.nix
./devtools/default.nix
];
rsydn.shell.zsh = {
enable = true;
plugins = [ ];
extraAfter = ''
# Source personal secrets
[ -f ~/.config/zsh/secrets.zsh ] && source ~/.config/zsh/secrets.zsh
# Custom PATH additions
export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:$HOME/.composer/vendor/bin"
export PATH="$HOME/.claude/local/bin:$PATH"
export PATH="$HOME/go/bin:$PATH"
export PATH="/usr/local/texlive/2024/bin/universal-darwin:$PATH"
# NVM setup
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Bun setup
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# pnpm setup
export PNPM_HOME="$HOME/Library/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# LM Studio
export PATH="$PATH:$HOME/.lmstudio/bin"
# opencode
export PATH="$HOME/.opencode/bin:$PATH"
# Custom aliases
alias runopenwebui='DATA_DIR=~/.open-webui uvx --python 3.11 open-webui@latest serve'
# Vi mode
bindkey -v
# Conda setup (managed by conda init)
# >>> conda initialize >>>
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
else
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
'';
enableVimMode = true;
};
programs.git.enable = true;
home.packages = with pkgs; [ docker docker-compose ];
rsydn.devTools = {
enable = lib.mkDefault false;
packages = [ ];

View file

@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkOption types mkIf;
cfg = config.rsydn.devTools;
in {
options.rsydn.devTools = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable per-user development tooling packages.";
};
packages = mkOption {
type = types.listOf types.package;
default = [ ];
description = "Extra user-scoped packages to install.";
};
};
config = mkIf cfg.enable { home.packages = cfg.packages; };
}

View file

@ -0,0 +1,20 @@
{ pkgs, lib, ... }: {
programs.helix = {
enable = lib.mkDefault true;
settings = {
theme = "gruber-darker";
editor = {
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
};
languages.language = [{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
}];
};
}

View file

@ -0,0 +1,12 @@
{ inputs, pkgs, ... }:
let
system = pkgs.stdenv.hostPlatform.system;
lazyvim = inputs."nvim-bundle".packages.${system}.neovim;
in {
programs.neovim = {
enable = true;
package = lazyvim;
withNodeJs = true;
withPython3 = true;
};
}

View file

@ -0,0 +1,33 @@
{ lib, pkgs, ... }: {
programs.tmux = {
enable = lib.mkDefault true;
clock24 = true;
historyLimit = 20000;
mouse = true;
baseIndex = 1;
prefix = "C-a";
escapeTime = 0;
aggressiveResize = true;
plugins = [{
plugin = pkgs.tmuxPlugins.dracula;
extraConfig = ''
set -g @dracula-pane-border-style "fg=#44475a"
set -g @dracula-plugins "cpu-usage battery network-bandwidth time"
set -g @dracula-show-empty-plugins off
set -g @dracula-refresh-rate 5
'';
}];
extraConfig = ''
set-option -g status-style "bg=#282a36 fg=#f8f8f2"
set -g status-interval 5
setw -g automatic-rename on
set -g renumber-windows on
bind r source-file ~/.tmux.conf \; display-message "tmux reloaded"
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
set -g display-panes-time 1500
'';
};
}

View file

@ -0,0 +1,83 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.rsydn.shell.zsh;
in {
options.rsydn.shell.zsh = {
enable = mkEnableOption "user zsh configuration managed by Home Manager";
theme = mkOption {
type = types.str;
default = "powerlevel10k/powerlevel10k";
description = "Oh My Zsh theme name.";
};
plugins = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Oh My Zsh plugins to load.";
};
aliases = mkOption {
type = types.attrsOf types.str;
default = { };
description = "Zsh command aliases.";
};
extraBeforeCompInit = mkOption {
type = types.lines;
default = ''
if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
fi
'';
description =
"Extra script executed before compinit (useful for instant prompt).";
};
extraAfter = mkOption {
type = types.lines;
default = "";
description = "Additional script appended after Oh My Zsh loads.";
};
enableAutoSuggestion = mkOption {
type = types.bool;
default = true;
description = "Enable zsh-autosuggestions.";
};
enableSyntaxHighlighting = mkOption {
type = types.bool;
default = true;
description = "Enable zsh-syntax-highlighting.";
};
enableVimMode = mkOption {
type = types.bool;
default = false;
description = "Enable vi keybindings by running bindkey -v.";
};
};
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = cfg.enableAutoSuggestion;
syntaxHighlighting.enable = cfg.enableSyntaxHighlighting;
shellAliases = cfg.aliases;
initExtraBeforeCompInit = cfg.extraBeforeCompInit;
initExtraFirst = lib.optionalString cfg.enableVimMode ''
bindkey -v
'';
initExtra = cfg.extraAfter;
oh-my-zsh = {
enable = true;
theme = cfg.theme;
plugins = cfg.plugins;
};
};
};
}