From c2f0d9bebe68c11f4d018a18bd5d3880712c6873 Mon Sep 17 00:00:00 2001 From: schererleander Date: Tue, 29 Jul 2025 02:03:38 +0200 Subject: chore: move home-manager modules in seperate folder --- modules/chromium.nix | 30 ---- modules/default.nix | 23 ---- modules/dunst.nix | 16 --- modules/firefox.nix | 271 ------------------------------------- modules/foot.nix | 52 ------- modules/git.nix | 20 --- modules/gpg.nix | 12 -- modules/home-manager/default.nix | 10 ++ modules/home-manager/dunst.nix | 16 +++ modules/home-manager/firefox.nix | 271 +++++++++++++++++++++++++++++++++++++ modules/home-manager/foot.nix | 52 +++++++ modules/home-manager/git.nix | 20 +++ modules/home-manager/gpg.nix | 12 ++ modules/home-manager/nixcord.nix | 26 ++++ modules/home-manager/spicetify.nix | 26 ++++ modules/home-manager/sway.nix | 84 ++++++++++++ modules/home-manager/tmux.nix | 22 +++ modules/home-manager/vscode.nix | 51 +++++++ modules/home-manager/waybar.nix | 90 ++++++++++++ modules/home-manager/zathura.nix | 27 ++++ modules/home-manager/zsh.nix | 70 ++++++++++ modules/nixcord.nix | 26 ---- modules/spicetify.nix | 26 ---- modules/sway.nix | 84 ------------ modules/tmux.nix | 22 --- modules/vscode.nix | 51 ------- modules/waybar.nix | 90 ------------ modules/zathura.nix | 27 ---- modules/zsh.nix | 70 ---------- 29 files changed, 777 insertions(+), 820 deletions(-) delete mode 100644 modules/chromium.nix delete mode 100644 modules/default.nix delete mode 100644 modules/dunst.nix delete mode 100644 modules/firefox.nix delete mode 100644 modules/foot.nix delete mode 100644 modules/git.nix delete mode 100644 modules/gpg.nix create mode 100644 modules/home-manager/default.nix create mode 100644 modules/home-manager/dunst.nix create mode 100644 modules/home-manager/firefox.nix create mode 100644 modules/home-manager/foot.nix create mode 100644 modules/home-manager/git.nix create mode 100644 modules/home-manager/gpg.nix create mode 100644 modules/home-manager/nixcord.nix create mode 100644 modules/home-manager/spicetify.nix create mode 100644 modules/home-manager/sway.nix create mode 100644 modules/home-manager/tmux.nix create mode 100644 modules/home-manager/vscode.nix create mode 100644 modules/home-manager/waybar.nix create mode 100644 modules/home-manager/zathura.nix create mode 100644 modules/home-manager/zsh.nix delete mode 100644 modules/nixcord.nix delete mode 100644 modules/spicetify.nix delete mode 100644 modules/sway.nix delete mode 100644 modules/tmux.nix delete mode 100644 modules/vscode.nix delete mode 100644 modules/waybar.nix delete mode 100644 modules/zathura.nix delete mode 100644 modules/zsh.nix diff --git a/modules/chromium.nix b/modules/chromium.nix deleted file mode 100644 index c73e8fa..0000000 --- a/modules/chromium.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.chromium.enable = lib.mkEnableOption "Enable chromium and setup with extension"; - config = lib.mkIf config.chromium.enable { - programs.chromium = { - enable = true; - package = pkgs.ungoogled-chromium; - extensions = let - createChromiumExtensionFor = browserVersion: { id, sha256, version }: { - inherit id; - crxPath = builtins.fetchurl { - url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc"; - name = "${id}.crx"; - inherit sha256; - }; - inherit version; - }; - createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version); - in [ - (createChromiumExtension { - # ublock origin - id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; - sha256 = "sha256:0pdh1v0vx1d5vnl1zh7nbk6j1fh4k4hhwp1ljs203icn306lahsn"; - version = "1.63.2"; - }) - ]; - }; - }; -} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index 239ac18..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ pkgs, lib, ... }: { - imports = [ - ./git.nix - ./zsh.nix - ./foot.nix - ./sway.nix - ./tmux.nix - ./emacs.nix - ./waybar.nix - ./nextcloud.nix - ./spicetify.nix - ./zathura.nix - ./vscode.nix - ./chromium.nix - ./nixcord.nix - ./wezterm.nix - ./firefox.nix - ./nvf.nix - ./aerospace.nix - ./dunst.nix - ./gpg.nix - ]; -} diff --git a/modules/dunst.nix b/modules/dunst.nix deleted file mode 100644 index 87ae210..0000000 --- a/modules/dunst.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ 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/firefox.nix b/modules/firefox.nix deleted file mode 100644 index 7d3dd4d..0000000 --- a/modules/firefox.nix +++ /dev/null @@ -1,271 +0,0 @@ -{ 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/foot.nix b/modules/foot.nix deleted file mode 100644 index 69f6bf2..0000000 --- a/modules/foot.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ 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/git.nix b/modules/git.nix deleted file mode 100644 index cb87206..0000000 --- a/modules/git.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ 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/gpg.nix b/modules/gpg.nix deleted file mode 100644 index 257295e..0000000 --- a/modules/gpg.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ 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/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 [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"; } + ]; + }; + }; + }; +} diff --git a/modules/nixcord.nix b/modules/nixcord.nix deleted file mode 100644 index 0be180b..0000000 --- a/modules/nixcord.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ 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/spicetify.nix b/modules/spicetify.nix deleted file mode 100644 index 5d245d9..0000000 --- a/modules/spicetify.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ 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/sway.nix b/modules/sway.nix deleted file mode 100644 index 16043ef..0000000 --- a/modules/sway.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ 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/tmux.nix b/modules/tmux.nix deleted file mode 100644 index e109375..0000000 --- a/modules/tmux.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ 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/vscode.nix b/modules/vscode.nix deleted file mode 100644 index 3dd2541..0000000 --- a/modules/vscode.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ 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/waybar.nix b/modules/waybar.nix deleted file mode 100644 index a3adb3b..0000000 --- a/modules/waybar.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ 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/zathura.nix b/modules/zathura.nix deleted file mode 100644 index 592119b..0000000 --- a/modules/zathura.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ 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/zsh.nix b/modules/zsh.nix deleted file mode 100644 index e229c40..0000000 --- a/modules/zsh.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ 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 [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"; } - ]; - }; - }; - }; -} -- cgit v1.3.1