From 64817ef4ff316294c34836c749afeea3fe4a6b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nina=20Chl=C3=B3e=20Kassandra=20Rei=C3=9F?= Date: Mon, 20 Apr 2026 15:59:52 +0200 Subject: [PATCH] Add ssh and git configuration --- applications/matrix.nix | 15 +- desktop-environment/application-browser.nix | 6 +- desktop-environment/browser.nix | 221 +++++++++--------- desktop-environment/config.nix | 38 +-- desktop-environment/file-browser.nix | 6 +- desktop-environment/planner.nix | 61 ++--- desktop-environment/status-bar.nix | 6 +- desktop-environment/terminal-emulator.nix | 6 +- desktop-environment/window-manager.nix | 8 +- .../window-manager/hyprland.nix | 92 ++++---- desktop-environment/workspace-manager.nix | 6 +- home.nix | 28 +-- profile.nix | 20 +- system-environment/config.nix | 18 +- system-environment/file-system.nix | 26 +-- system-environment/media.nix | 16 +- system-environment/security/keyring.nix | 14 +- terminal-environment/config.nix | 175 ++++++++------ terminal-environment/editor.nix | 37 +-- terminal-environment/external/tmux.conf | 87 +++++++ terminal-environment/genv/default.nix | 104 ++++----- terminal-environment/tex-environment.nix | 8 +- 22 files changed, 569 insertions(+), 429 deletions(-) create mode 100644 terminal-environment/external/tmux.conf diff --git a/applications/matrix.nix b/applications/matrix.nix index a89df3c..6827c43 100644 --- a/applications/matrix.nix +++ b/applications/matrix.nix @@ -1,9 +1,14 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - profile = import ./profile.nix; + profile = import ./profile.nix; in { - home.packages = with pkgs; [ - fluffychat - ]; + home.packages = with pkgs; [ + fluffychat + ]; } diff --git a/desktop-environment/application-browser.nix b/desktop-environment/application-browser.nix index 6441a49..a539619 100644 --- a/desktop-environment/application-browser.nix +++ b/desktop-environment/application-browser.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - # New system packages - ]; + home.packages = with pkgs; [ + # New system packages + ]; } diff --git a/desktop-environment/browser.nix b/desktop-environment/browser.nix index 94f17e8..fc712e0 100644 --- a/desktop-environment/browser.nix +++ b/desktop-environment/browser.nix @@ -1,113 +1,118 @@ { config, pkgs, ... }: { - home.packages = with pkgs; [ - # New system packages - ]; - - programs.firefox = { - enable = true; - policies = { - AppAutoUpdate = false; - AllowFileSelectionDialogs = true; - AutofillAddressEnabled = true; - AutofillCreditCardEnabled = false; - CaptivePortal = true; - DisableFirefoxAccounts = true; - DisableSecurityBypass = { - InvalidCertificate = false; - SafeBrowsing = false; - }; - DisableSetDesktopBackground = true; - DisableTelemetry = true; - ExtensionUpdate = true; - FirefoxHome = { - Search = true; - TopSites = true; - SponsoredTopSites = false; - Highlights = true; - Pocket = false; - Stories = false; - SponsoredPocket = false; - SponsoredStories = false; - Snippets = true; - Locked = true; - }; - PictureInPicture = { - Enabled = true; - Locked = false; - }; - ExtensionSettings = { - "nextcloud-passwords@nextcloud.com" = { - installation_mode = "force_installed"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/nextcloud-passwords/latest.xpi"; - }; - - "instapaper@instapaper.com" = { - installation_mode = "force_installed"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/instapaper-official/latest.xpi"; - }; - - "weh@mozilla.org" = { - installation_mode = "force_installed"; - install_url = "https://addons.mozilla.org/firefox/downloads/latest/video-downloadhelper/latest.xpi"; - }; - }; - Preferences = { - # Tracking Protection - "browser.contentblocking.category" = "strict"; - "privacy.trackingprotection.enabled" = true; - "privacy.trackingprotection.socialtracking.enabled" = true; - - # Cookies - "network.cookie.cookieBehavior" = 1; # block third-party cookies - - # Fingerprinting Protection - "privacy.resistFingerprinting" = true; - "privacy.resistFingerprinting.block_mozAddonManager" = true; - - # WebRTC IP Leak verhindern - "media.peerconnection.enabled" = false; - - # Telemetrie vollständig deaktivieren - "toolkit.telemetry.enabled" = false; - "toolkit.telemetry.unified" = false; - "toolkit.telemetry.archive.enabled" = false; - "datareporting.healthreport.uploadEnabled" = false; - "app.shield.optoutstudies.enabled" = false; - - # SafeBrowsing (lokal behalten, aber keine unnötige Kommunikation) - "browser.safebrowsing.downloads.remote.enabled" = false; - - # HTTPS-Only Mode - "dom.security.https_only_mode" = true; - - # DNS over HTTPS Fallback deaktivieren - "network.trr.mode" = 3; - "network.trr.uri" = "https://dns.quad9.net/dns-query"; - - # Referrer reduzieren - "network.http.referer.XOriginPolicy" = 2; - - # Clipboard API nur bei User Interaction - "dom.events.asyncClipboard.readText" = false; - - # WebGL einschränken - "webgl.disabled" = true; - }; - SearchEngines = { - Default = "Ecosia"; - - Add = [ - { - Name = "Ecosia"; - URLTemplate = "https://www.ecosia.org/search?q={searchTerms}"; - Method = "GET"; - } - ]; - - Remove = [ "Google" "Bing" "Amazon.com" "eBay" ]; - }; + home.packages = with pkgs; [ + # New system packages + ]; + programs.firefox = { + enable = true; + policies = { + AppAutoUpdate = false; + AllowFileSelectionDialogs = true; + AutofillAddressEnabled = true; + AutofillCreditCardEnabled = false; + CaptivePortal = true; + DisableFirefoxAccounts = true; + DisableSecurityBypass = { + InvalidCertificate = false; + SafeBrowsing = false; + }; + DisableSetDesktopBackground = true; + DisableTelemetry = true; + ExtensionUpdate = true; + FirefoxHome = { + Search = true; + TopSites = true; + SponsoredTopSites = false; + Highlights = true; + Pocket = false; + Stories = false; + SponsoredPocket = false; + SponsoredStories = false; + Snippets = true; + Locked = true; + }; + PictureInPicture = { + Enabled = true; + Locked = false; + }; + ExtensionSettings = { + "nextcloud-passwords@nextcloud.com" = { + installation_mode = "force_installed"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/nextcloud-passwords/latest.xpi"; }; + + "instapaper@instapaper.com" = { + installation_mode = "force_installed"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/instapaper-official/latest.xpi"; + }; + + "weh@mozilla.org" = { + installation_mode = "force_installed"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/video-downloadhelper/latest.xpi"; + }; + }; + Preferences = { + # Tracking Protection + "browser.contentblocking.category" = "strict"; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.socialtracking.enabled" = true; + + # Cookies + "network.cookie.cookieBehavior" = 1; # block third-party cookies + + # Fingerprinting Protection + "privacy.resistFingerprinting" = true; + "privacy.resistFingerprinting.block_mozAddonManager" = true; + + # WebRTC IP Leak verhindern + "media.peerconnection.enabled" = false; + + # Telemetrie vollständig deaktivieren + "toolkit.telemetry.enabled" = false; + "toolkit.telemetry.unified" = false; + "toolkit.telemetry.archive.enabled" = false; + "datareporting.healthreport.uploadEnabled" = false; + "app.shield.optoutstudies.enabled" = false; + + # SafeBrowsing (lokal behalten, aber keine unnötige Kommunikation) + "browser.safebrowsing.downloads.remote.enabled" = false; + + # HTTPS-Only Mode + "dom.security.https_only_mode" = true; + + # DNS over HTTPS Fallback deaktivieren + "network.trr.mode" = 3; + "network.trr.uri" = "https://dns.quad9.net/dns-query"; + + # Referrer reduzieren + "network.http.referer.XOriginPolicy" = 2; + + # Clipboard API nur bei User Interaction + "dom.events.asyncClipboard.readText" = false; + + # WebGL einschränken + "webgl.disabled" = true; + }; + SearchEngines = { + Default = "Ecosia"; + + Add = [ + { + Name = "Ecosia"; + URLTemplate = "https://www.ecosia.org/search?q={searchTerms}"; + Method = "GET"; + } + ]; + + Remove = [ + "Google" + "Bing" + "Amazon.com" + "eBay" + ]; + }; + }; - } + }; +} diff --git a/desktop-environment/config.nix b/desktop-environment/config.nix index f028f29..f54213e 100644 --- a/desktop-environment/config.nix +++ b/desktop-environment/config.nix @@ -1,29 +1,29 @@ { pkgs, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - imports = [ - ./browser.nix - #./planner.nix - ./window-manager.nix - ../applications/matrix.nix - ]; + imports = [ + ./browser.nix + #./planner.nix + ./window-manager.nix + ../applications/matrix.nix + ]; - home.packages = with pkgs; [ - kitty - pamixer - nemo-with-extensions - ]; + home.packages = with pkgs; [ + kitty + pamixer + nemo-with-extensions + ]; - #services.dbus.enable = true; - #programs.dconf.enable = true; + #services.dbus.enable = true; + #programs.dconf.enable = true; - xdg.portal = { - enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; - config.common.default = "*"; - }; + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + config.common.default = "*"; + }; } diff --git a/desktop-environment/file-browser.nix b/desktop-environment/file-browser.nix index 6441a49..a539619 100644 --- a/desktop-environment/file-browser.nix +++ b/desktop-environment/file-browser.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - # New system packages - ]; + home.packages = with pkgs; [ + # New system packages + ]; } diff --git a/desktop-environment/planner.nix b/desktop-environment/planner.nix index 4246ac0..dfd17a5 100644 --- a/desktop-environment/planner.nix +++ b/desktop-environment/planner.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let tbProfile = pkgs.stdenv.mkDerivation { name = "thunderbird-profile"; @@ -11,38 +16,38 @@ let }; in { - home.packages = with pkgs; [ - # New system packages - ]; + home.packages = with pkgs; [ + # New system packages + ]; - programs.thunderbird = { - enable = true; - package = pkgs.thunderbird; + programs.thunderbird = { + enable = true; + package = pkgs.thunderbird; - policies = { - DisableTelemetry = true; - DisableAppUpdate = true; + policies = { + DisableTelemetry = true; + DisableAppUpdate = true; - Preferences = { - "mail.provider.enabled" = false; - "mail.openpgp.allow_external_gnupg" = true; - "calendar.timezone.local" = "Europe/Berlin"; - }; + Preferences = { + "mail.provider.enabled" = false; + "mail.openpgp.allow_external_gnupg" = true; + "calendar.timezone.local" = "Europe/Berlin"; + }; - Certificates = { - ImportEnterpriseRoots = true; - }; + Certificates = { + ImportEnterpriseRoots = true; + }; - PasswordManagerEnabled = true; - Cookies = { - "Default" = false; - "AcceptThirdParty" = "never"; - "Locked" = true; - }; + PasswordManagerEnabled = true; + Cookies = { + "Default" = false; + "AcceptThirdParty" = "never"; + "Locked" = true; + }; - DefaultDownloadDirectory = "/tmp"; - DisableBuiltinPDFViewer = true; - DisablePasswordReveal = true; - }; + DefaultDownloadDirectory = "/tmp"; + DisableBuiltinPDFViewer = true; + DisablePasswordReveal = true; }; + }; } diff --git a/desktop-environment/status-bar.nix b/desktop-environment/status-bar.nix index 6441a49..a539619 100644 --- a/desktop-environment/status-bar.nix +++ b/desktop-environment/status-bar.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - # New system packages - ]; + home.packages = with pkgs; [ + # New system packages + ]; } diff --git a/desktop-environment/terminal-emulator.nix b/desktop-environment/terminal-emulator.nix index 6441a49..a539619 100644 --- a/desktop-environment/terminal-emulator.nix +++ b/desktop-environment/terminal-emulator.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - # New system packages - ]; + home.packages = with pkgs; [ + # New system packages + ]; } diff --git a/desktop-environment/window-manager.nix b/desktop-environment/window-manager.nix index b16a04e..9a55e59 100644 --- a/desktop-environment/window-manager.nix +++ b/desktop-environment/window-manager.nix @@ -1,9 +1,9 @@ { pkgs, lib, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - imports = [ - #./window-manager/${profile.interface}.nix - ]; + imports = [ + #./window-manager/${profile.interface}.nix + ]; } diff --git a/desktop-environment/window-manager/hyprland.nix b/desktop-environment/window-manager/hyprland.nix index 1847966..c656302 100644 --- a/desktop-environment/window-manager/hyprland.nix +++ b/desktop-environment/window-manager/hyprland.nix @@ -1,59 +1,61 @@ { pkgs, lib, ... }: let - dotfiles_hypr = pkgs.fetchgit { - url = "https://git.nichkara.eu/dotfiles/hypr"; - rev = "83da92f0d64620c6503b8b2d9fa27bd79816e025"; - sha256 = "sha256-kEKJiH0oK0PuciJZ6ucinTKX5eMWxPPZXYNS1+HIcRA="; - }; + dotfiles_hypr = pkgs.fetchgit { + url = "https://git.nichkara.eu/dotfiles/hypr"; + rev = "83da92f0d64620c6503b8b2d9fa27bd79816e025"; + sha256 = "sha256-kEKJiH0oK0PuciJZ6ucinTKX5eMWxPPZXYNS1+HIcRA="; + }; - dotfiles_waybar = pkgs.fetchgit { - url = "https://git.nichkara.eu/dotfiles/waybar"; - rev = "cd3d5d8a97f9fbc1cc8a69fc9e570dfcf669dce7"; - sha256 = "sha256-FTpGumhxY6ChUXqnykO+aSJiFD4A80W0eqx7hXS9Iwc="; - }; + dotfiles_waybar = pkgs.fetchgit { + url = "https://git.nichkara.eu/dotfiles/waybar"; + rev = "cd3d5d8a97f9fbc1cc8a69fc9e570dfcf669dce7"; + sha256 = "sha256-FTpGumhxY6ChUXqnykO+aSJiFD4A80W0eqx7hXS9Iwc="; + }; - profile = import ../../profile.nix; + profile = import ../../profile.nix; in { - home.packages = with pkgs; [ - wofi - grim - swaynotificationcenter - swaylock - hyprpaper - lxsession - hyprshot - wayvnc - pamixer - pavucontrol - brightnessctl - python313Packages.requests - networkmanagerapplet - ]; + home.packages = with pkgs; [ + wofi + grim + swaynotificationcenter + swaylock + hyprpaper + lxsession + hyprshot + wayvnc + pamixer + pavucontrol + brightnessctl + python313Packages.requests + networkmanagerapplet + ]; - #fonts.packages = with pkgs; [ - # nerd-fonts.space-mono - # ]; + #fonts.packages = with pkgs; [ + # nerd-fonts.space-mono + # ]; - programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; - }; + programs.hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + }; - programs.waybar = { - enable = true; - }; + programs.waybar = { + enable = true; + }; - home.file.".config/hypr" = { - source = dotfiles_hypr; - recursive = true; - }; + home.file.".config/hypr" = { + source = dotfiles_hypr; + force = true; + recursive = true; + }; - home.file.".config/waybar" = { - source = dotfiles_waybar; - recursive = true; - }; + home.file.".config/waybar" = { + source = dotfiles_waybar; + force = true; + recursive = true; + }; } diff --git a/desktop-environment/workspace-manager.nix b/desktop-environment/workspace-manager.nix index 6441a49..a539619 100644 --- a/desktop-environment/workspace-manager.nix +++ b/desktop-environment/workspace-manager.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - # New system packages - ]; + home.packages = with pkgs; [ + # New system packages + ]; } diff --git a/home.nix b/home.nix index 07df108..4b5de45 100644 --- a/home.nix +++ b/home.nix @@ -1,9 +1,9 @@ { config, pkgs, ... }: let - profile = import ./profile.nix; - home-directory = "/home/${profile.username}"; - ssh-filename = "${home-directory}/.ssh/id_ed25519"; + profile = import ./profile.nix; + home-directory = "/home/${profile.username}"; + ssh-filename = "${home-directory}/.ssh/id_ed25519"; in { # Home Manager needs a bit of information about you and the paths it should @@ -27,18 +27,18 @@ in # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; + #home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + #}; home.sessionVariables = { EDITOR = "nvim"; diff --git a/profile.nix b/profile.nix index e4807fc..4c042b4 100644 --- a/profile.nix +++ b/profile.nix @@ -1,12 +1,12 @@ { - username = "nichkara"; - hostname = "kathleen"; - hashed-password = "$y$j9T$51IqmPE8iKV9NmF89vaK40$TJFaBOiMgcxYRWxyj3M5q47QWAIzMbwDhSoqLM3EPk4"; - interface = "hyprland"; - modules = { - base = true; - office = false; - development = true; - science = true; - }; + username = "nichkara"; + hostname = "kathleen"; + hashed-password = "$y$j9T$51IqmPE8iKV9NmF89vaK40$TJFaBOiMgcxYRWxyj3M5q47QWAIzMbwDhSoqLM3EPk4"; + interface = "hyprland"; + modules = { + base = true; + office = false; + development = true; + science = true; + }; } diff --git a/system-environment/config.nix b/system-environment/config.nix index 7365cde..d4b1eba 100644 --- a/system-environment/config.nix +++ b/system-environment/config.nix @@ -1,16 +1,16 @@ { pkgs, lib, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - imports = [ - ./file-system.nix - ./media.nix - ]; + imports = [ + ./file-system.nix + ./media.nix + ]; - home.packages = with pkgs; [ - gnumake - python3 - ]; + home.packages = with pkgs; [ + gnumake + python3 + ]; } diff --git a/system-environment/file-system.nix b/system-environment/file-system.nix index e402464..8d18945 100644 --- a/system-environment/file-system.nix +++ b/system-environment/file-system.nix @@ -1,19 +1,19 @@ { pkgs, ... }: { - #services.udisks2.enable = true; - #services.gvfs.enable = true; + #services.udisks2.enable = true; + #services.gvfs.enable = true; - home.packages = with pkgs; [ - nextcloud-client - unzip - deja-dup - gnutar - xz - gzip - gz-utils - file - fileinfo - ]; + home.packages = with pkgs; [ + nextcloud-client + unzip + deja-dup + gnutar + xz + gzip + gz-utils + file + fileinfo + ]; } diff --git a/system-environment/media.nix b/system-environment/media.nix index 3547c7a..4699eb3 100644 --- a/system-environment/media.nix +++ b/system-environment/media.nix @@ -1,12 +1,12 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - calibre - kdePackages.okular - vlc - totem - w3m - epr - ]; + home.packages = with pkgs; [ + calibre + kdePackages.okular + vlc + totem + w3m + epr + ]; } diff --git a/system-environment/security/keyring.nix b/system-environment/security/keyring.nix index 75d178d..dd4d1d6 100644 --- a/system-environment/security/keyring.nix +++ b/system-environment/security/keyring.nix @@ -1,15 +1,15 @@ { pkgs, lib, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - imports = [ ]; + imports = [ ]; - home.packages = with pkgs; [ - seahorse - ]; + home.packages = with pkgs; [ + seahorse + ]; - services.gnome.gnome-keyring.enable = true; - security.pam.services.login.enableGnomeKeyring = true; + services.gnome.gnome-keyring.enable = true; + security.pam.services.login.enableGnomeKeyring = true; } diff --git a/terminal-environment/config.nix b/terminal-environment/config.nix index ad308ff..a57169b 100644 --- a/terminal-environment/config.nix +++ b/terminal-environment/config.nix @@ -1,80 +1,115 @@ { config, pkgs, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - imports = [ - ./editor.nix - ./tex-environment.nix - ]; + imports = [ + ./editor.nix + ./tex-environment.nix + ]; - home.packages = with pkgs; [ - astyle - hyfetch - fzf-zsh - distrobox + home.packages = with pkgs; [ + git + astyle + hyfetch + fzf-zsh + distrobox + ]; + + programs.tmux = { + enable = true; + clock24 = true; + extraConfig = builtins.readFile ./external/tmux.conf; + }; + + programs.direnv.enable = true; + programs.direnv.nix-direnv.enable = true; + + programs.git = { + enable = true; + settings = { + user = { + name = "Nina Chlóe Kassandra Reiß"; + email = "nina.reiss@nickr.eu"; + }; + push = { + autoSetupRemote = true; + }; + }; + }; + + programs.ssh = { + enable = true; + enableDefaultConfig = true; + + extraConfig = '' + Host git.nickr.eu + HostName git.nickr.eu + Port 22 + + Host nickr.eu + HostName nickr.eu + Port 222 + + Host nichkara.eu + HostName nichkara.eu + Port 222 + + Host git.nichkara.eu + HostName git.nichkara.eu + Port 22 + ''; + }; + + programs.zsh = { + enable = true; + enableCompletion = true; + autocd = true; + + autosuggestion = { + enable = true; + }; + + syntaxHighlighting = { + enable = true; + }; + + history = { + size = 4096; + ignoreSpace = true; + ignorePatterns = [ ]; + saveNoDups = true; + ignoreAllDups = true; + }; + + oh-my-zsh = { + enable = true; + theme = "sonicradish"; + plugins = [ + "git" + "z" + "dotenv" + "battery" + "emoji" + "emoji-clock" + "fzf" + "kitty" + "themes" + "tmux" + "vi-mode" + ]; + }; + + setOptions = [ + "HIST_IGNORE_ALL_DUPS" ]; - programs.tmux = { - enable = true; - clock24 = true; - extraConfig = '' - - ''; - }; - - programs.direnv.enable = true; - programs.direnv.nix-direnv.enable = true; - - programs.zsh = { - enable = true; - enableCompletion = true; - autocd = true; - - autosuggestion = { - enable = true; - }; - - syntaxHighlighting = { - enable = true; - }; - - history = { - size = 4096; - ignoreSpace = true; - ignorePatterns = [ ]; - saveNoDups = true; - ignoreAllDups = true; - }; - - oh-my-zsh = { - enable = true; - theme = "sonicradish"; - plugins = [ - "git" - "z" - "dotenv" - "battery" - "emoji" - "emoji-clock" - "fzf" - "kitty" - "themes" - "tmux" - "vi-mode" - ]; - }; - - setOptions = [ - "HIST_IGNORE_ALL_DUPS" - ]; - - shellAliases = { - ll = "ls -lh"; - nix-check = "nixos-rebuild build"; - nix-update = "sudo nixos-rebuild switch"; - sirc = "ssh -t nichkara.eu tmux new-session -A -s weechat weechat"; - }; + shellAliases = { + ll = "ls -lh"; + nix-check = "nixos-rebuild build"; + nix-update = "sudo nixos-rebuild switch"; + sirc = "ssh -t nichkara.eu tmux new-session -A -s weechat weechat"; }; + }; } diff --git a/terminal-environment/editor.nix b/terminal-environment/editor.nix index a7a294e..e73590f 100644 --- a/terminal-environment/editor.nix +++ b/terminal-environment/editor.nix @@ -1,25 +1,26 @@ { config, pkgs, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - home.packages = with pkgs; [ - vim - fzf - ripgrep - ripgrep-all - ctags - lua54Packages.luarocks-nix - ]; + home.packages = with pkgs; [ + vim + fzf + ripgrep + ripgrep-all + ctags + lua54Packages.luarocks-nix + nixfmt + ]; - programs.neovim = { - enable = true; - defaultEditor = true; - withPython3 = true; - withRuby = true; - withNodeJs = true; - viAlias = true; - vimAlias = true; - }; + programs.neovim = { + enable = true; + defaultEditor = true; + withPython3 = true; + withRuby = true; + withNodeJs = true; + viAlias = true; + vimAlias = true; + }; } diff --git a/terminal-environment/external/tmux.conf b/terminal-environment/external/tmux.conf new file mode 100644 index 0000000..2e84663 --- /dev/null +++ b/terminal-environment/external/tmux.conf @@ -0,0 +1,87 @@ +##### CORE ##### +set -g default-terminal "tmux-256color" +set -ga terminal-overrides ",xterm-256color:Tc" + +set -g mouse on +set -g focus-events on +set -g history-limit 100000 + +set -g base-index 1 +setw -g pane-base-index 1 + +##### TIMING / UX ##### +set -g escape-time 10 +set -g repeat-time 600 + +##### BELL / ACTIVITY ##### +# Keine akustische Bell, nur visuell +set -g bell-action none +set -g visual-bell on +set -g visual-activity on + +setw -g monitor-activity on +set -g activity-action none + +# Window-Status bei Bell / Activity (Fallback-Styling) +set -g window-status-bell-style "fg=#ff5555,bold" +set -g window-status-activity-style "fg=#f1fa8c,bold" + +##### COLORS (Dracula-ish) ##### +set -g status-style "bg=#1e1f29,fg=#c0caf5" +set -g message-style "bg=#2a2b3d,fg=#c0caf5" + +set -g pane-border-style "fg=#3b4261" +set -g pane-active-border-style "fg=#7aa2f7" + +##### STATUS BAR ##### +set -g status on +set -g status-interval 2 +set -g status-position bottom +set -g status-justify left + +set -g status-left-length 100 +set -g status-right-length 100 + +##### LEFT: Session / Host ##### +set -g status-left " \ +#[fg=#7aa2f7,bold] #S#[default] \ +#[fg=#565f89] #[fg=#9ece6a]#H#[default] \ +" + +##### WINDOW LIST ##### +# Inactive windows +setw -g window-status-format " \ +#[fg=#565f89] #I:#W#[default] \ +#{?window_bell_flag,#[fg=#ff5555]🔔#[default],} \ +" + +# Active window +setw -g window-status-current-format " \ +#[fg=#1e1f29,bg=#7aa2f7,bold] #I:#W#[default] \ +#[fg=#1e1f29,bg=#7aa2f7]\ +#{?window_bell_flag,🔔,}#[default] \ +" + +##### RIGHT: Clock only (no broken flags) ##### +set -g status-right " \ +#[fg=#565f89] #[fg=#7dcfff] %H:%M#[default] \ +" + +##### PANE INFO ##### +set -g pane-border-status top +set -g pane-border-format " #[fg=#565f89]#P #[fg=#7aa2f7]#{pane_current_command}#[default] " + +##### SMART SPLITS ##### +bind | split-window -h +bind - split-window -v +#unbind '"' +#unbind % + +##### COPY MODE (VI) ##### +setw -g mode-keys vi +bind -T copy-mode-vi v send -X begin-selection +bind -T copy-mode-vi y send -X copy-selection + +##### DIM INACTIVE PANES ##### +set -g window-style "bg=#1a1b26" +set -g window-active-style "bg=#1e1f29" diff --git a/terminal-environment/genv/default.nix b/terminal-environment/genv/default.nix index 0b7b0d4..9c888f8 100644 --- a/terminal-environment/genv/default.nix +++ b/terminal-environment/genv/default.nix @@ -2,64 +2,64 @@ let genv = pkgs.writeShellScriptBin "genv" '' - #!/usr/bin/env bash - set -e + #!/usr/bin/env bash + set -e - DISTRO="$1" - PRESET="$2" + DISTRO="$1" + PRESET="$2" - if [ -z "$DISTRO" ] || [ -z "$PRESET" ]; then - echo "Usage: genv " - exit 1 + if [ -z "$DISTRO" ] || [ -z "$PRESET" ]; then + echo "Usage: genv " + exit 1 + fi + + PROJECT=$(basename "$PWD") + BOX="genv-$PROJECT" + + # distro mapping + case "$DISTRO" in + ubuntu) IMAGE="docker.io/library/ubuntu:24.04" ;; + arch) IMAGE="docker.io/library/archlinux:latest" ;; + alpine) IMAGE="docker.io/library/alpine:latest" ;; + *) IMAGE="$DISTRO" ;; + esac + + echo "[genv] image: $IMAGE" + + # container nur erstellen wenn nötig + if ! distrobox list | grep -q "$BOX"; then + distrobox create --name "$BOX" --image "$IMAGE" + fi + + mkdir -p .genv + + # preset kopieren + cp ${./presets}/$PRESET.sh .genv/setup.sh + chmod +x .genv/setup.sh + + # envrc generieren + cat > .envrc </dev/null 2>&1 || true + + # setup einmalig + if [ ! -f .genv/.init ]; then + echo "[genv] setup läuft" + distrobox enter "$GENV_BOX" -- bash .genv/setup.sh + touch .genv/.init fi - PROJECT=$(basename "$PWD") - BOX="genv-$PROJECT" - - # distro mapping - case "$DISTRO" in - ubuntu) IMAGE="docker.io/library/ubuntu:24.04" ;; - arch) IMAGE="docker.io/library/archlinux:latest" ;; - alpine) IMAGE="docker.io/library/alpine:latest" ;; - *) IMAGE="$DISTRO" ;; - esac - - echo "[genv] image: $IMAGE" - - # container nur erstellen wenn nötig - if ! distrobox list | grep -q "$BOX"; then - distrobox create --name "$BOX" --image "$IMAGE" + # tmux workflow + if [ -z "$TMUX" ]; then + tmux new-session -A -s "$GENV_BOX" \ + \; new-window -n editor "nvim" \ + \; new-window -n dev "distrobox enter $GENV_BOX" fi + EOF - mkdir -p .genv - - # preset kopieren - cp ${./presets}/$PRESET.sh .genv/setup.sh - chmod +x .genv/setup.sh - - # envrc generieren - cat > .envrc </dev/null 2>&1 || true - -# setup einmalig -if [ ! -f .genv/.init ]; then - echo "[genv] setup läuft" - distrobox enter "$GENV_BOX" -- bash .genv/setup.sh - touch .genv/.init -fi - -# tmux workflow -if [ -z "$TMUX" ]; then - tmux new-session -A -s "$GENV_BOX" \ - \; new-window -n editor "nvim" \ - \; new-window -n dev "distrobox enter $GENV_BOX" -fi -EOF - - echo "[genv] fertig → direnv allow" + echo "[genv] fertig → direnv allow" ''; in { diff --git a/terminal-environment/tex-environment.nix b/terminal-environment/tex-environment.nix index c423ef7..1247a2d 100644 --- a/terminal-environment/tex-environment.nix +++ b/terminal-environment/tex-environment.nix @@ -1,11 +1,11 @@ { config, pkgs, ... }: let - profile = import ../profile.nix; + profile = import ../profile.nix; in { - home.packages = with pkgs; [ - texliveMedium - ]; + home.packages = with pkgs; [ + texliveMedium + ]; }