aboutsummaryrefslogtreecommitdiff
path: root/modules/home-manager
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home-manager')
-rw-r--r--modules/home-manager/default.nix10
-rw-r--r--modules/home-manager/dunst.nix16
-rw-r--r--modules/home-manager/firefox.nix271
-rw-r--r--modules/home-manager/foot.nix52
-rw-r--r--modules/home-manager/git.nix20
-rw-r--r--modules/home-manager/gpg.nix12
-rw-r--r--modules/home-manager/nixcord.nix26
-rw-r--r--modules/home-manager/spicetify.nix26
-rw-r--r--modules/home-manager/sway.nix84
-rw-r--r--modules/home-manager/tmux.nix22
-rw-r--r--modules/home-manager/vscode.nix51
-rw-r--r--modules/home-manager/waybar.nix90
-rw-r--r--modules/home-manager/zathura.nix27
-rw-r--r--modules/home-manager/zsh.nix70
14 files changed, 777 insertions, 0 deletions
diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix
new file mode 100644
index 0000000..0eca7ff
--- /dev/null
+++ b/modules/home-manager/default.nix
@@ -0,0 +1,10 @@
+{ pkgs, lib, ... }: {
+ imports = [
+ ./git.nix
+ ./zsh.nix
+ ./tmux.nix
+ ./zathura.nix
+ ./vscode.nix
+ ./gpg.nix
+ ];
+}
diff --git a/modules/home-manager/dunst.nix b/modules/home-manager/dunst.nix
new file mode 100644
index 0000000..87ae210
--- /dev/null
+++ b/modules/home-manager/dunst.nix
@@ -0,0 +1,16 @@
+{ config, pkgs, lib, ...}:
+
+{
+ options.dunst.enable = lib.mkEnableOption "Setup dunst notification";
+ config = lib.mkIf config.dunst.enable {
+ services.dunst = {
+ enable = true;
+ settings = {
+ global = {
+ transparency = 10;
+ font = "monospace 10";
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home-manager/firefox.nix b/modules/home-manager/firefox.nix
new file mode 100644
index 0000000..7d3dd4d
--- /dev/null
+++ b/modules/home-manager/firefox.nix
@@ -0,0 +1,271 @@
+{ config, lib, pkgs, inputs, ... }:
+
+{
+ options.firefox.enable = lib.mkEnableOption "Setup firefox";
+ config = lib.mkIf config.firefox.enable {
+ programs.firefox = {
+ enable = true;
+ profiles.default = {
+ extensions = {
+ packages = with inputs.firefox-addons.packages.${pkgs.system}; [
+ ublock-origin
+ istilldontcareaboutcookies
+ sponsorblock
+ decentraleyes
+ vimium-c
+ ];
+
+ force = true;
+
+ settings."uBlock0@raymondhill.net".settings = {
+ UserMessaging = {
+ uiTheme = "dark";
+ uiAccentCustom = true;
+ uiAccentCustom0 = "#2C2C2C";
+ cloudStorageEnabled = false;
+ contextMenuEnabled = false;
+ };
+ # Block annoying login with google banner
+ userFilters = ''
+ ||accounts.google.com/gsi/*
+ '';
+ };
+ };
+
+ search.engines = {
+ nix-packages = {
+ name = "Nix Packages";
+ urls = [{
+ template = "https://search.nixos.org/packages";
+ params = [
+ { name = "type"; value = "packages"; }
+ { name = "query"; value = "{searchTerms}"; }
+ ];
+ }];
+
+ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+ definedAliases = [ "@np" ];
+ };
+
+ nixos-wiki = {
+ name = "NixOS Wiki";
+ urls = [{ template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; }];
+ iconMapObj."16" = "https://wiki.nixos.org/favicon.ico";
+ definedAliases = [ "@nw" ];
+ };
+
+ startpage = {
+ name = "Startpage";
+ urls = [{
+ template = "https://www.startpage.com/sp/search?query={searchTerms}";
+ }];
+ icon = "https://www.startpage.com/favicon.ico";
+ definedAliases = [ "@s" ];
+ };
+
+ bing.metaData.hidden = true;
+ google.metaData.alias = "@g";
+ };
+
+ search.default = "startpage";
+
+ settings = {
+ };
+
+ userChrome = ''
+ /* Hide Back, Forward, Reload, Stop, All Tabs, Firefox View buttons */
+ #back-button,
+ #forward-button,
+ #reload-button,
+ #stop-button,
+ #alltabs-button,
+ #firefox-view-button {
+ display: none !important;
+ }
+
+ .titlebar-buttonbox-container {
+ display: none;
+ }
+
+ #tabbrowser-tabs {
+ border-inline: none !important;
+ }
+
+ /* Transparent background tabs (above url bar) */
+ #navigator-toolbox {
+ -moz-appearance: -moz-vibrant-titlebar !important;
+ background: rgba(0, 0, 0, 0.8) !important;
+ }
+
+ /* Transparent background (behind url bar) */
+ #nav-bar {
+ background: none !important;
+ box-shadow: none !important;
+ border-top: 0px !important;
+ }
+
+ .tab-background[selected="true"] {
+ background-color: #393e43 !important;
+ background-image: none !important;
+ }
+
+ .tab-background {
+ background-color: var(--background) !important;
+ color: var(--foreground) !important;
+ box-shadow: none !important;;
+ }
+
+ .tab-background[selected] {
+ background-color: rgba(0, 0, 0, 0.30) !important;
+ color: var(--foreground) !important;
+ box-shadow: none !important;
+ }
+
+ /* Needed for # transparency in general */
+ :root {
+ --tabpanel-background-color: transparent !important;
+ --chrome-content-separator-color: transparent !important;
+ --toolbar-bgcolor: rgba(0, 0, 0, 0.9) !important;
+ --newtab-background-color: rgba(0, 0, 0, 0.9) !important;
+ --newtab-background-color-secondary: transparent !important;
+ --toolbar-field-background-color: rgba(120, 120, 120, 0.10) !important;
+ }
+ '';
+ userContent = ''
+ @-moz-document url-prefix("about:"), url("about:home") {
+ /* Transparent about:settings about:config about:policies */
+ :root {
+ background: rgba(0, 0, 0, 0.0) !important;
+ }
+ }
+
+ /* Transparent about:home */
+ * {
+ --newtab-background-color: transparent !important;
+ --newtab-background-color-secondary: transparent !important;
+ }
+
+ /* Transparent elements in about:* */
+ * {
+ --in-content-page-background: transparent !important;
+ --background-color-box: rgba(0, 0, 0, 0.5) !important;
+ }
+ '';
+ };
+
+ policies = {
+ DisableTelemetry = true;
+ DisableFirefoxStudies = true;
+ PasswordManagerEnabled = false;
+ OfferToSaveLogins = false;
+ DisablePocket = true;
+ DisplayBookmarksToolbar = "never";
+ NoDefaultBookmarks = true;
+
+ EnableTrackingProtection = {
+ Value = true;
+ Locked = true;
+ Cryptomining = true;
+ Fingerprinting = true;
+ };
+
+ EncryptedMediaExtensions = {
+ Enabled = true;
+ Locked = true;
+ };
+
+ FirefoxHome = {
+ Search = true;
+ TopSites = true;
+ SponsoredTopSites = false;
+ Highlights = true;
+ Pocket = false;
+ SponsoredPocket = false;
+ Snippets = false;
+ Locked = true;
+ };
+
+ UserMessaging = {
+ ExtensionRecommendations = false;
+ FeatureRecommendations = false;
+ Locked = true;
+ MoreFromMozilla = false;
+ SkipOnboarding = true;
+ UrlbarInterventions = false;
+ WhatsNew = false;
+ };
+
+ Preferences = {
+ "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+ "browser.toolbars.bookmarks.visibility" = "never";
+
+ # Disable fullscreen notification
+ "full-screen-api.warning.timeout" = "0";
+
+ # Disable annoying translation popup
+ "browser.translations.automaticallyPopup" = false;
+
+ # Enable all extensions automatically
+ "extensions.autoDisableScopes" = 0;
+
+ # Hide ctr-tab tab preview menu
+ "browser.ctrlTab.sortByRecentlyUsed" = false;
+
+ # Hide pip controls
+ "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
+
+ # Set homepage
+ "browser.startup.homepage" = "about:blank";
+ "browser.newtab.url" = "about:blank";
+ "browser.newtabpage.enabled" = false;
+
+ # transparency
+ "browser.tabs.allow_transparent_browser" = true;
+ "gfx.webrender.all" = true;
+
+ # Privacy settings
+ "privacy.firstparty.isolate" = true; # Isolate cookies per site
+ "privacy.resistFingerprinting" = true;
+
+ # Enable HTTPS-Only Mode
+ "dom.security.https_only_mode" = true;
+ "dom.security.https_only_mode_ever_enabled" = true;
+
+ # More Privacy settings
+ "privacy.trackingprotection.enabled" = true;
+ "privacy.trackingprotection.socialtracking.enabled" = true;
+ "privacy.partition.network_state.ocsp_cache" = true;
+
+ # Disable all sorts of telemetry
+ "browser.newtabpage.activity-stream.feeds.telemetry" = false;
+ "browser.newtabpage.activity-stream.telemetry" = false;
+ "browser.ping-centre.telemetry" = false;
+ "toolkit.telemetry.archive.enabled" = false;
+ "toolkit.telemetry.bhrPing.enabled" = false;
+ "toolkit.telemetry.enabled" = false;
+ "toolkit.telemetry.firstShutdownPing.enabled" = false;
+ "toolkit.telemetry.hybridContent.enabled" = false;
+ "toolkit.telemetry.newProfilePing.enabled" = false;
+ "toolkit.telemetry.reportingpolicy.firstRun" = false;
+ "toolkit.telemetry.shutdownPingSender.enabled" = false;
+ "toolkit.telemetry.unified" = false;
+ "toolkit.telemetry.updatePing.enabled" = false;
+
+ # Disable Firefox 'experiments'
+ "experiments.activeExperiment" = false;
+ "experiments.enabled" = false;
+ "experiments.supported" = false;
+ "network.allow-experiments" = false;
+
+ # Disable Pocket Integration
+ "browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
+ "extensions.pocket.enabled" = false;
+ "extensions.pocket.api" = "";
+ "extensions.pocket.oAuthConsumerKey" = "";
+ "extensions.pocket.showHome" = false;
+ "extensions.pocket.site" = "";
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home-manager/foot.nix b/modules/home-manager/foot.nix
new file mode 100644
index 0000000..69f6bf2
--- /dev/null
+++ b/modules/home-manager/foot.nix
@@ -0,0 +1,52 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.foot.enable = lib.mkEnableOption "Enable and configure the Foot terminal emulator";
+ config = lib.mkIf config.foot.enable {
+ home.packages = with pkgs; [
+ nerd-fonts.space-mono
+ ];
+
+ programs.foot = {
+ enable = true;
+ settings = {
+ main = {
+ pad = "10x10";
+ font = "SpaceMono Nerd Font Mono:size=10";
+ line-height = 12;
+ };
+
+ cursor = {
+ style = "underline";
+ unfocused-style = "unchanged";
+ blink = true;
+ };
+
+ colors = {
+ alpha = 0.9;
+ # Gruvbox Theme
+ background = "000000";
+ foreground = "ebdbb2";
+
+ regular0 = "282828";
+ regular1 = "cc241d";
+ regular2 = "98971a";
+ regular3 = "d79921";
+ regular4 = "458588";
+ regular5 = "b16286";
+ regular6 = "689d6a";
+ regular7 = "a89984";
+
+ bright0 = "928374";
+ bright1 = "fb4934";
+ bright2 = "b8bb26";
+ bright3 = "fabd2f";
+ bright4 = "83a598";
+ bright5 = "d3869b";
+ bright6 = "8ec07c";
+ bright7 = "ebdbb2";
+ };
+ };
+ };
+ };
+}
diff --git a/modules/home-manager/git.nix b/modules/home-manager/git.nix
new file mode 100644
index 0000000..cb87206
--- /dev/null
+++ b/modules/home-manager/git.nix
@@ -0,0 +1,20 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.git.enable = lib.mkEnableOption "Enable and configure Git";
+ config = lib.mkIf config.git.enable {
+ programs.git = {
+ enable = true;
+ userName = "schererleander";
+ userEmail = "leander@schererleander.de";
+ extraConfig = {
+ user.signingkey = "506793F115464BB4";
+ commit.gpgsign = "true";
+ pull.rebase = true;
+ alias.co = "checkout";
+ alias.br = "branch";
+ alias.st = "status";
+ };
+ };
+ };
+}
diff --git a/modules/home-manager/gpg.nix b/modules/home-manager/gpg.nix
new file mode 100644
index 0000000..257295e
--- /dev/null
+++ b/modules/home-manager/gpg.nix
@@ -0,0 +1,12 @@
+{ config, pkgs, lib, ...}:
+
+{
+ options.gpg.enable = lib.mkEnableOption "Setup gpg and agent";
+ config = lib.mkIf config.gpg.enable {
+ programs.gpg.enable = true;
+ services.gpg-agent = {
+ enable = true;
+ pinentry.package = pkgs.pinentry-curses;
+ };
+ };
+}
diff --git a/modules/home-manager/nixcord.nix b/modules/home-manager/nixcord.nix
new file mode 100644
index 0000000..0be180b
--- /dev/null
+++ b/modules/home-manager/nixcord.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, inputs, ... }:
+
+{
+ options.nixcord.enable = lib.mkEnableOption "Enable nixcord and setup";
+ config = lib.mkIf config.nixcord.enable {
+ programs.nixcord = {
+ enable = true; # enable Nixcord. Also installs discord package
+ #quickCss = "some CSS"; # quickCSS file
+ config = {
+ #useQuickCss = true; # use our quickCSS
+ #themeLinks = [ # or use an online theme
+ # "https://raw.githubusercontent.com/link/to/some/theme.css"
+ #];
+ frameless = true; # set some Vencord options
+ plugins = {
+ hideAttachments.enable = true; # Enable a Vencord plugin
+ ignoreActivities = { # Enable a plugin and set some options
+ enable = true;
+ ignorePlaying = true;
+ ignoreWatching = true;
+ };
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/home-manager/spicetify.nix b/modules/home-manager/spicetify.nix
new file mode 100644
index 0000000..5d245d9
--- /dev/null
+++ b/modules/home-manager/spicetify.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, inputs, ... }:
+
+let
+ spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
+in {
+ options.spicetify.enable = lib.mkEnableOption "Enable Spicetify integration";
+ config = lib.mkIf config.spicetify.enable {
+ programs.spicetify = {
+ enable = true;
+ enabledSnippets = with spicePkgs.snippets; [
+ pointer
+ sonicDancing
+ modernScrollbar
+ nyanCatProgressBar
+ declutterNowPlayingBar
+ ];
+
+ enabledExtensions = with spicePkgs.extensions; [
+ keyboardShortcut
+ ];
+
+ theme = spicePkgs.themes.sleek;
+ colorScheme = "Coral";
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix
new file mode 100644
index 0000000..16043ef
--- /dev/null
+++ b/modules/home-manager/sway.nix
@@ -0,0 +1,84 @@
+{ config, lib, pkgs, ... }:
+
+let
+ mod = config.wayland.windowManager.sway.config.modifier;
+in {
+ options.sway.enable = lib.mkEnableOption "Enable sway and setup";
+ config = lib.mkIf config.sway.enable {
+ home.packages = with pkgs; [
+ wmenu
+ swaybg
+ sway-contrib.grimshot
+ wl-clipboard
+ xdg-utils
+ playerctl
+ ];
+
+ xdg = {
+ portal = {
+ enable = true;
+ extraPortals = with pkgs; [
+ xdg-desktop-portal-wlr
+ xdg-desktop-portal-gtk
+ ];
+ config = {
+ common.default = "*";
+ };
+ };
+ };
+
+ wayland.windowManager.sway = {
+ enable = true;
+ config = {
+ input = {
+ "*" = {
+ xkb_layout = "de";
+ };
+ };
+
+ output = {
+ DP-1 = {
+ resolution = "1920x1080@240Hz";
+ bg = "/etc/nixos/images/pond.jpg fill";
+ };
+ };
+
+ gaps = {
+ inner = 15;
+ };
+
+ window = {
+ titlebar = false;
+ border = 0;
+ };
+
+ modifier = "Mod4";
+
+ keybindings = lib.mkOptionDefault {
+ "${mod}+q" = "kill";
+ "XF86AudioPlay" = "exec playerctl play-pause";
+ "XF86AudioPrev" = "exec playerctl previous";
+ "XF86AudioNext" = "exec playerctl next";
+ "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_DEVICE@ +5%";
+ "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_DEVICE@ -5%";
+ "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_DEVICE@ toggle";
+ };
+
+ menu = "${pkgs.wmenu}/bin/wmenu-run -b -N 000000";
+ terminal = "${pkgs.foot}/bin/foot";
+ defaultWorkspace = "workspace number 1";
+
+ bars = [{
+ "command" = "${pkgs.waybar}/bin/waybar";
+ }];
+ };
+ checkConfig = false;
+ wrapperFeatures.base = true;
+ wrapperFeatures.gtk = true;
+ };
+
+ home.sessionVariables = {
+ XDG_CURRENT_DESKTOP = "wayland";
+ };
+ };
+}
diff --git a/modules/home-manager/tmux.nix b/modules/home-manager/tmux.nix
new file mode 100644
index 0000000..e109375
--- /dev/null
+++ b/modules/home-manager/tmux.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.tmux.enable = lib.mkEnableOption "Enable and configure Tmux";
+ config = lib.mkIf config.tmux.enable {
+ programs.tmux = {
+ enable = true;
+ extraConfig = ''
+ unbind C-b
+ set-option -g prefix C-a
+ bind-key C-a send-prefix
+
+ bind -n M-Left select-pane -L
+ bind -n M-Right select-pane -R
+ bind -n M-Up select-pane -U
+ bind -n M-Down select-pane -D
+
+ set -g mouse on
+ '';
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/home-manager/vscode.nix b/modules/home-manager/vscode.nix
new file mode 100644
index 0000000..3dd2541
--- /dev/null
+++ b/modules/home-manager/vscode.nix
@@ -0,0 +1,51 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.vscode.enable = lib.mkEnableOption "Enable vscode and setup";
+ config = lib.mkIf config.vscode.enable {
+ programs.vscode = {
+ enable = true;
+ mutableExtensionsDir = false;
+ profiles.default = {
+ enableUpdateCheck = true;
+ enableExtensionUpdateCheck = true;
+
+ userSettings = {
+ "update.mode" = "none";
+ "workbench.colorTheme" = "Minimal";
+ "editor.fontFamily" = "'SpaceMono Nerd Font Mono', monospace";
+ "editor.tabSize" = 2;
+ "editor.minimap.enabled" = false;
+ "terminal.integrated.cursorStyle" = "underline";
+ "terminal.integrated.cursorStyleInactive" = "underline";
+ "terminal.integrated.fontFamily" = "'BlexMono Nerd Font Mono', monospace";
+ "terminal.integrated.fontSize" = 13;
+ "git.autofetch" = true;
+ "window.controlsStyle" = "custom";
+ };
+
+ extensions = (with pkgs.vscode-extensions; [
+ ms-vscode.cmake-tools
+ ms-azuretools.vscode-docker
+ eamodio.gitlens
+ ms-python.python
+ golang.go
+ rust-lang.rust-analyzer
+ vscjava.vscode-maven
+ sumneko.lua
+ #fwcd.kotlin
+ bradlc.vscode-tailwindcss
+ adpyke.codesnap
+ esbenp.prettier-vscode
+ ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
+ {
+ name = "minimalist-dark";
+ publisher = "nichabosh";
+ version = "1.0.0";
+ sha256 = "sha256-lw+Scfada6DycLdRT2Cz+Fd12JucglIrw3uRd2ZhabQ=";
+ }
+ ]);
+ };
+ };
+ };
+}
diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix
new file mode 100644
index 0000000..a3adb3b
--- /dev/null
+++ b/modules/home-manager/waybar.nix
@@ -0,0 +1,90 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.waybar.enable = lib.mkEnableOption "Enable and configure Waybar";
+ config = lib.mkIf config.waybar.enable {
+
+ programs.waybar = {
+ enable = true;
+ settings = {
+ mainBar = {
+ height = 15;
+ layer = "top";
+ position = "bottom";
+ modules-center = [ ];
+ modules-left = [ "sway/workspaces" ];
+ modules-right = [
+ "tray"
+ "privacy"
+ "battery"
+ "pulseaudio"
+ "network"
+ "bluetooth"
+ "clock"
+ ];
+
+ tray = { spacing = 10; };
+
+ privacy = { icon-size = 16; };
+
+ network = {
+ format-disconnect = "";
+ format-ethernet = "";
+ format-wifi = "{icon} {signalStrength}";
+ format-icon = [ "󰤟" "󰤢" "󰤥" "󰤨" ];
+ tooltip-format-wifi = "{essid}";
+ tooltip-format-ethernet = "{ifname}";
+ };
+
+ bluetooth = {
+ format = " {status}";
+ format-disabled = "";
+ format-no-controller = "";
+ format-connected = " {device_alias}";
+ tooltip = false;
+ };
+
+ clock = {
+ format-alt = "{:%Y-%m-%d}";
+ tooltip-format = "{:%Y-%m-%d | %H:%M}";
+ };
+
+ pulseaudio = {
+ format = "{icon} {volume}%";
+ format-bluetooth = "{volume}% {icon}";
+ format-icons = {
+ default = [ "" "" "" ];
+ };
+ };
+ };
+ };
+
+ style = ''
+ * {
+ border: none;
+ border-radius: 0;
+ font-family: monospace;
+ font-size: 12px;
+ }
+
+ window#waybar {
+ background: rgba(0, 0, 0, 0.9);
+ }
+
+ #workspaces button {
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+
+ #workspaces button.focused {
+ font-weight: bold;
+ }
+
+ #clock, #pulseaudio, #tray, #network, battery, bluetooth {
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+ '';
+ };
+ };
+}
diff --git a/modules/home-manager/zathura.nix b/modules/home-manager/zathura.nix
new file mode 100644
index 0000000..592119b
--- /dev/null
+++ b/modules/home-manager/zathura.nix
@@ -0,0 +1,27 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.zathura.enable = lib.mkEnableOption "Enable zathura and setup";
+ config = lib.mkIf config.zathura.enable {
+ programs.zathura = {
+ enable = true;
+ options = {
+ recolor-lightcolor = "rgba(0, 0, 0, 0)";
+ recolor-darkcolor = "rgba(255, 255, 255, 1)";
+ recolor = true;
+ adjust-open = "width";
+ guioptions = "none";
+ zoom-center = true;
+ page-padding = 0;
+ pages-per-row = 1;
+ scroll-page-aware = true;
+ };
+
+ mappings = {
+ i = "recolor";
+ j = "navigate previous";
+ k = "navigate next";
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix
new file mode 100644
index 0000000..e229c40
--- /dev/null
+++ b/modules/home-manager/zsh.nix
@@ -0,0 +1,70 @@
+{ config, lib, pkgs, ... }:
+
+{
+ options.zsh.enable = lib.mkEnableOption "Configure zsh";
+ config = lib.mkIf config.zsh.enable {
+ home.packages = with pkgs; [
+ zoxide
+ ];
+
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ autosuggestion.enable = true;
+ syntaxHighlighting.enable = true;
+
+ initContent = ''
+ # view man pages with nvim
+ export MANPAGER="nvim +Man!"
+
+ # Directory completion with trailing slash
+ zstyle ':completion:*' list-dirs-first true
+ zstyle ':completion:*' special-dirs true
+ zstyle ':completion:*' squeeze-slashes true
+ zstyle ':completion:*' add-space false
+
+ # Case-insensitive completion
+ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
+
+ # vim keybindings
+ bindkey -v
+
+ # imagemagick wrapper function to remove background
+ remove_bg() {
+ if [[ $# -lt 2 ]]; then
+ echo 'Usage: remove_bg <input_file> <fuzz_percentage> [transparent_color] [output_file]'
+ return 1
+ fi
+
+ local input_file=$1
+ local fuzz=$2
+ local transparent_color=$3
+ local output_file=$4
+
+ magick "$input_file" \
+ -fuzz "$fuzz" -transparent "$transparent_color" \
+ -blur 0x1 \
+ "$output_file"
+
+ echo "Saved transparent image to: $output_file"
+ }
+
+ eval "$(zoxide init zsh)"
+ '';
+
+ shellAliases = {
+ ls = "ls --color=auto";
+ };
+
+ zplug = {
+ enable = true;
+ plugins = [
+ { name = "mafredri/zsh-async"; }
+ { name = "sindresorhus/pure"; tags = [ "as:theme" "use:pure.zsh" ]; }
+ { name = "zdharma-continuum/fast-syntax-highlighting"; }
+ { name = "zsh-users/zsh-autosuggestions"; }
+ ];
+ };
+ };
+ };
+}