From daee8da3aec67a5209f9436801cd7e996c60d05d Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 22 Mar 2026 23:02:27 +0100 Subject: [PATCH] Home: Move bat/cava/fastfetch/ssh/tmux configs to modules + deduplicate nix-darwin home config --- home/christoph/darwinix/default.nix | 254 +-------------------- home/christoph/default.nix | 291 +------------------------ home/homemodules/bat/default.nix | 34 +++ home/homemodules/bat/options.nix | 7 + home/homemodules/cava/default.nix | 48 ++++ home/homemodules/cava/options.nix | 7 + home/homemodules/darwin.nix | 4 + home/homemodules/default.nix | 5 + home/homemodules/fastfetch/default.nix | 163 ++++++++++++++ home/homemodules/fastfetch/options.nix | 7 + home/homemodules/ssh/default.nix | 70 ++++++ home/homemodules/ssh/options.nix | 7 + home/homemodules/tmux/default.nix | 38 ++++ home/homemodules/tmux/options.nix | 7 + 14 files changed, 408 insertions(+), 534 deletions(-) create mode 100644 home/homemodules/bat/default.nix create mode 100644 home/homemodules/bat/options.nix create mode 100644 home/homemodules/cava/default.nix create mode 100644 home/homemodules/cava/options.nix create mode 100644 home/homemodules/fastfetch/default.nix create mode 100644 home/homemodules/fastfetch/options.nix create mode 100644 home/homemodules/ssh/default.nix create mode 100644 home/homemodules/ssh/options.nix create mode 100644 home/homemodules/tmux/default.nix create mode 100644 home/homemodules/tmux/options.nix diff --git a/home/christoph/darwinix/default.nix b/home/christoph/darwinix/default.nix index f2addabf..1df06150 100644 --- a/home/christoph/darwinix/default.nix +++ b/home/christoph/darwinix/default.nix @@ -17,6 +17,8 @@ }; homemodules = { + bat.enable = true; + color = { scheme = "catppuccin-mocha"; accent = "mauve"; @@ -27,6 +29,7 @@ font = "MonoLisa Alt Script"; }; + fastfetch.enable = true; fish.enable = true; git = { @@ -46,6 +49,8 @@ neovide = true; }; + ssh.enable = true; + tmux.enable = true; yazi.enable = true; }; @@ -118,26 +123,6 @@ programs = { home-manager.enable = true; - bat = { - enable = true; - - themes = { - catppuccin-latte = { - src = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "bat"; - rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; - sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; - }; - file = "Catppuccin-latte.tmTheme"; - }; - }; - - config = { - theme = "catppuccin-latte"; - }; - }; - direnv = { enable = true; nix-direnv.enable = true; @@ -148,155 +133,6 @@ enableFishIntegration = config.homemodules.fish.enable; }; - fastfetch = { - enable = true; - - settings = { - logo = { - padding = { - top = 4; - left = 1; - right = 2; - }; - }; - - display = { - separator = ""; - key.width = 17; - }; - - # Box Drawing: ╭ ─ ╮ ╰ ╯ │ - modules = [ - # Title - { - type = "title"; - format = "{#1}╭─── {#}{user-name-colored}"; - } - - # System Information - { - type = "custom"; - format = "{#1}│ {#}System Information"; - } - { - type = "os"; - key = "{#separator}│ {#keys}󰍹 OS"; - } - { - type = "kernel"; - key = "{#separator}│ {#keys}󰒋 Kernel"; - } - { - type = "bootmgr"; - key = "{#separator}│ {#keys}󰒋 BootMGR"; - } - { - type = "uptime"; - key = "{#separator}│ {#keys}󰅐 Uptime"; - } - { - type = "packages"; - key = "{#separator}│ {#keys}󰏖 Packages"; - # format = "{all}"; - } - { - type = "custom"; - format = "{#1}│"; - } - - # Desktop Environment - { - type = "custom"; - format = "{#1}│ {#}Desktop Environment"; - } - { - type = "de"; - key = "{#separator}│ {#keys}󰧨 DE"; - } - { - type = "wm"; - key = "{#separator}│ {#keys}󱂬 WM"; - } - { - type = "wmtheme"; - key = "{#separator}│ {#keys}󰉼 Theme"; - } - { - type = "display"; - key = "{#separator}│ {#keys}󰹑 Resolution"; - } - { - type = "shell"; - key = "{#separator}│ {#keys}󰞷 Shell"; - } - { - type = "terminalfont"; - key = "{#separator}│ {#keys}󰛖 Font"; - } - { - type = "icons"; - key = "{#separator}│ {#keys} Icons"; - } - { - type = "cursor"; - key = "{#separator}│ {#keys}󰆽 Cursor"; - } - { - type = "custom"; - format = "{#1}│"; - } - - # Hardware Information - { - type = "custom"; - format = "{#1}│ {#}Hardware Information"; - } - { - type = "board"; - key = "{#separator}│ {#keys} Board"; - } - { - type = "cpu"; - key = "{#separator}│ {#keys}󰻠 CPU"; - } - { - type = "gpu"; - key = "{#separator}│ {#keys}󰢮 GPU"; - } - { - type = "memory"; - key = "{#separator}│ {#keys}󰍛 Memory"; - } - # { - # type = "disk"; - # key = "{#separator}│ {#keys}󰋊 Disk (/)"; - # folders = "/"; - # } - # { - # type = "disk"; - # key = "{#separator}│ {#keys}󰋊 Disk (~/Games)"; - # folders = "/home/christoph/Games"; - # } - { - type = "btrfs"; - key = "{#separator}│ {#keys}󰋊 BTRFS"; - } - { - type = "custom"; - format = "{#1}│"; - } - - # Colors Footer - { - type = "colors"; - key = "{#separator}╰─── {#1}"; - keyWidth = 6; - symbol = "circle"; - } - ]; - }; - }; - fd.enable = true; fzf = { @@ -309,86 +145,6 @@ enableFishIntegration = config.homemodules.fish.enable; }; - ssh = { - enable = true; - enableDefaultConfig = false; - - matchBlocks = { - "*" = { - forwardAgent = false; - addKeysToAgent = "yes"; - compression = true; - serverAliveInterval = 0; - serverAliveCountMax = 3; - hashKnownHosts = false; - userKnownHostsFile = "~/.ssh/known_hosts"; - controlMaster = "no"; - controlPath = "~/.ssh/master-%r@%n:%p"; - controlPersist = "no"; - }; - "nixinator" = { - port = 5432; - user = "christoph"; - hostname = "vps.chriphost.de"; - }; - "servenix" = { - user = "christoph"; - hostname = "local.chriphost.de"; - }; - "thinknix" = { - user = "christoph"; - hostname = "think.chriphost.de"; - }; - "vps" = { - user = "root"; - hostname = "vps.chriphost.de"; - }; - "mars" = { - user = "smchurla"; - hostname = "mars.cs.tu-dortmund.de"; - serverAliveInterval = 60; - localForwards = [ - { - # Resultbrowser - bind.port = 22941; - host.address = "127.0.0.1"; - host.port = 22941; - } - { - # Mysql - bind.port = 3306; - host.address = "127.0.0.1"; - host.port = 3306; - } - ]; - }; - }; - }; - - tmux = { - enable = true; - - clock24 = true; - escapeTime = 0; # Delay after pressing escape - # keyMode = "vi"; - terminal = "xterm-256color"; - - plugins = with pkgs; [ - { - plugin = tmuxPlugins.catppuccin; - extraConfig = '' - set -g @plugin 'catppuccin/tmux' - set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha - ''; - } - ]; - - extraConfig = '' - set -g default-terminal "xterm-256color" - set-option -ga terminal-overrides ",xterm-256color:Tc" - ''; - }; - yt-dlp.enable = true; zoxide = { diff --git a/home/christoph/default.nix b/home/christoph/default.nix index f56c6a2b..e439cb8b 100644 --- a/home/christoph/default.nix +++ b/home/christoph/default.nix @@ -33,9 +33,10 @@ in }; homemodules = { + bat.enable = true; beets.enable = !headless; - btop.enable = true; + cava.enable = !headless; chromium = { enable = !headless; @@ -70,6 +71,8 @@ in docs.enable = !headless; + fastfetch.enable = true; + firefox = { enable = !headless; wayland = true; @@ -107,6 +110,8 @@ in enable = false; }; + ssh.enable = true; + tmux.enable = true; waybar.enable = !headless; yazi.enable = true; zathura.enable = !headless; @@ -417,60 +422,6 @@ in # Will only be enabled if HM is installed standalone. home-manager.enable = true; - bat = { - enable = true; - - themes = { - catppuccin-latte = { - src = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "bat"; - rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; - sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; - }; - file = "Catppuccin-latte.tmTheme"; - }; - }; - - config = { - theme = "catppuccin-latte"; - }; - }; - - cava = { - enable = !headless; - - settings = { - general = { - framerate = 60; # default 60 - autosens = 1; # default 1 - sensitivity = 100; # default 100 - lower_cutoff_freq = 50; # not passed to cava if not provided - higher_cutoff_freq = 10000; # not passed to cava if not provided - }; - - smoothing = { - noise_reduction = 77; # default 77 - monstercat = false; # default false - waves = false; # default false - }; - - color = { - # https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava - gradient = 1; - - gradient_color_1 = "'${color.hexS.teal}'"; - gradient_color_2 = "'${color.hexS.sky}'"; - gradient_color_3 = "'${color.hexS.sapphire}'"; - gradient_color_4 = "'${color.hexS.blue}'"; - gradient_color_5 = "'${color.hexS.mauve}'"; - gradient_color_6 = "'${color.hexS.pink}'"; - gradient_color_7 = "'${color.hexS.maroon}'"; - gradient_color_8 = "'${color.hexS.red}'"; - }; - }; - }; - direnv = { enable = true; nix-direnv.enable = true; @@ -481,156 +432,6 @@ in enableFishIntegration = config.homemodules.fish.enable; }; - # TODO: Module - fastfetch = { - enable = true; - - settings = { - logo = { - padding = { - top = 4; - left = 1; - right = 2; - }; - }; - - display = { - separator = ""; - key.width = 17; - }; - - # Box Drawing: ╭ ─ ╮ ╰ ╯ │ - modules = [ - # Title - { - type = "title"; - format = "{#1}╭─── {#}{user-name-colored}"; - } - - # System Information - { - type = "custom"; - format = "{#1}│ {#}System Information"; - } - { - type = "os"; - key = "{#separator}│ {#keys}󰍹 OS"; - } - { - type = "kernel"; - key = "{#separator}│ {#keys}󰒋 Kernel"; - } - { - type = "bootmgr"; - key = "{#separator}│ {#keys}󰒋 BootMGR"; - } - { - type = "uptime"; - key = "{#separator}│ {#keys}󰅐 Uptime"; - } - { - type = "packages"; - key = "{#separator}│ {#keys}󰏖 Packages"; - # format = "{all}"; - } - { - type = "custom"; - format = "{#1}│"; - } - - # Desktop Environment - { - type = "custom"; - format = "{#1}│ {#}Desktop Environment"; - } - { - type = "de"; - key = "{#separator}│ {#keys}󰧨 DE"; - } - { - type = "wm"; - key = "{#separator}│ {#keys}󱂬 WM"; - } - { - type = "wmtheme"; - key = "{#separator}│ {#keys}󰉼 Theme"; - } - { - type = "display"; - key = "{#separator}│ {#keys}󰹑 Resolution"; - } - { - type = "shell"; - key = "{#separator}│ {#keys}󰞷 Shell"; - } - { - type = "terminalfont"; - key = "{#separator}│ {#keys}󰛖 Font"; - } - { - type = "icons"; - key = "{#separator}│ {#keys} Icons"; - } - { - type = "cursor"; - key = "{#separator}│ {#keys}󰆽 Cursor"; - } - { - type = "custom"; - format = "{#1}│"; - } - - # Hardware Information - { - type = "custom"; - format = "{#1}│ {#}Hardware Information"; - } - { - type = "board"; - key = "{#separator}│ {#keys} Board"; - } - { - type = "cpu"; - key = "{#separator}│ {#keys}󰻠 CPU"; - } - { - type = "gpu"; - key = "{#separator}│ {#keys}󰢮 GPU"; - } - { - type = "memory"; - key = "{#separator}│ {#keys}󰍛 Memory"; - } - # { - # type = "disk"; - # key = "{#separator}│ {#keys}󰋊 Disk (/)"; - # folders = "/"; - # } - # { - # type = "disk"; - # key = "{#separator}│ {#keys}󰋊 Disk (~/Games)"; - # folders = "/home/christoph/Games"; - # } - { - type = "btrfs"; - key = "{#separator}│ {#keys}󰋊 BTRFS"; - } - { - type = "custom"; - format = "{#1}│"; - } - - # Colors Footer - { - type = "colors"; - key = "{#separator}╰─── {#1}"; - keyWidth = 6; - symbol = "circle"; - } - ]; - }; - }; - fd.enable = true; fzf = { @@ -700,86 +501,6 @@ in # ]; # }; - ssh = { - enable = true; - enableDefaultConfig = false; - - matchBlocks = { - "*" = { - forwardAgent = false; - addKeysToAgent = "no"; - compression = true; - serverAliveInterval = 0; - serverAliveCountMax = 3; - hashKnownHosts = false; - userKnownHostsFile = "~/.ssh/known_hosts"; - controlMaster = "no"; - controlPath = "~/.ssh/master-%r@%n:%p"; - controlPersist = "no"; - }; - "nixinator" = { - port = 5432; - user = "christoph"; - hostname = "vps.chriphost.de"; - }; - "servenix" = { - user = "christoph"; - hostname = "local.chriphost.de"; - }; - "thinknix" = { - user = "christoph"; - hostname = "think.chriphost.de"; - }; - "vps" = { - user = "root"; - hostname = "vps.chriphost.de"; - }; - "mars" = { - user = "smchurla"; - hostname = "mars.cs.tu-dortmund.de"; - serverAliveInterval = 60; - localForwards = [ - { - # Resultbrowser - bind.port = 22941; - host.address = "127.0.0.1"; - host.port = 22941; - } - { - # Mysql - bind.port = 3306; - host.address = "127.0.0.1"; - host.port = 3306; - } - ]; - }; - }; - }; - - tmux = { - enable = true; - - clock24 = true; - escapeTime = 0; # Delay after pressing escape - # keyMode = "vi"; - terminal = "xterm-256color"; - - plugins = with pkgs; [ - { - plugin = tmuxPlugins.catppuccin; - extraConfig = '' - set -g @plugin 'catppuccin/tmux' - set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha - ''; - } - ]; - - extraConfig = '' - set -g default-terminal "xterm-256color" - set-option -ga terminal-overrides ",xterm-256color:Tc" - ''; - }; - yt-dlp.enable = true; zoxide = { diff --git a/home/homemodules/bat/default.nix b/home/homemodules/bat/default.nix new file mode 100644 index 00000000..6897ab1c --- /dev/null +++ b/home/homemodules/bat/default.nix @@ -0,0 +1,34 @@ +{ + config, + nixosConfig, + lib, + mylib, + pkgs, + ... +}: let + inherit (config.homemodules) bat color; +in { + options.homemodules.bat = import ./options.nix {inherit lib mylib;}; + + config = lib.mkIf bat.enable { + programs.bat = { + enable = true; + + themes = { + catppuccin-latte = { + src = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "bat"; + rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; + sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; + }; + file = "Catppuccin-latte.tmTheme"; + }; + }; + + config = { + theme = "catppuccin-latte"; + }; + }; + }; +} diff --git a/home/homemodules/bat/options.nix b/home/homemodules/bat/options.nix new file mode 100644 index 00000000..88fa1b78 --- /dev/null +++ b/home/homemodules/bat/options.nix @@ -0,0 +1,7 @@ +{ + lib, + mylib, + ... +}: { + enable = lib.mkEnableOption "Enable bat"; +} diff --git a/home/homemodules/cava/default.nix b/home/homemodules/cava/default.nix new file mode 100644 index 00000000..f88f67d6 --- /dev/null +++ b/home/homemodules/cava/default.nix @@ -0,0 +1,48 @@ +{ + config, + nixosConfig, + lib, + mylib, + pkgs, + ... +}: let + inherit (config.homemodules) cava color; +in { + options.homemodules.cava = import ./options.nix {inherit lib mylib;}; + + config = lib.mkIf cava.enable { + programs.cava = { + enable = true; + + settings = { + general = { + framerate = 60; # default 60 + autosens = 1; # default 1 + sensitivity = 100; # default 100 + lower_cutoff_freq = 50; # not passed to cava if not provided + higher_cutoff_freq = 10000; # not passed to cava if not provided + }; + + smoothing = { + noise_reduction = 77; # default 77 + monstercat = false; # default false + waves = false; # default false + }; + + color = { + # https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava + gradient = 1; + + gradient_color_1 = "'${color.hexS.teal}'"; + gradient_color_2 = "'${color.hexS.sky}'"; + gradient_color_3 = "'${color.hexS.sapphire}'"; + gradient_color_4 = "'${color.hexS.blue}'"; + gradient_color_5 = "'${color.hexS.mauve}'"; + gradient_color_6 = "'${color.hexS.pink}'"; + gradient_color_7 = "'${color.hexS.maroon}'"; + gradient_color_8 = "'${color.hexS.red}'"; + }; + }; + }; + }; +} diff --git a/home/homemodules/cava/options.nix b/home/homemodules/cava/options.nix new file mode 100644 index 00000000..a061bfb2 --- /dev/null +++ b/home/homemodules/cava/options.nix @@ -0,0 +1,7 @@ +{ + lib, + mylib, + ... +}: { + enable = lib.mkEnableOption "Enable cava"; +} diff --git a/home/homemodules/darwin.nix b/home/homemodules/darwin.nix index c0129640..a979a5a4 100644 --- a/home/homemodules/darwin.nix +++ b/home/homemodules/darwin.nix @@ -1,13 +1,17 @@ {inputs, ...}: { imports = [ # My own HM modules + ./bat ./color + ./fastfetch ./fish ./git ./kitty ./lazygit ./neovim ./paths + ./ssh + ./tmux ./yazi # HM modules imported from the flake inputs diff --git a/home/homemodules/default.nix b/home/homemodules/default.nix index 0446fbec..742ba68e 100644 --- a/home/homemodules/default.nix +++ b/home/homemodules/default.nix @@ -3,11 +3,14 @@ # Obsolete modules are kept in "1_deprecated" for reference. # My own HM modules + ./bat ./beets ./btop + ./cava ./chromium ./color ./docs + ./fastfetch ./fcitx ./firefox ./fish @@ -23,6 +26,8 @@ ./rmpc ./rofi ./waybar + ./ssh + ./tmux ./yazi ./zathura diff --git a/home/homemodules/fastfetch/default.nix b/home/homemodules/fastfetch/default.nix new file mode 100644 index 00000000..52f38254 --- /dev/null +++ b/home/homemodules/fastfetch/default.nix @@ -0,0 +1,163 @@ +{ + config, + nixosConfig, + lib, + mylib, + pkgs, + ... +}: let + inherit (config.homemodules) fastfetch color; +in { + options.homemodules.fastfetch = import ./options.nix {inherit lib mylib;}; + + config = lib.mkIf fastfetch.enable { + programs.fastfetch = { + enable = true; + + settings = { + logo = { + padding = { + top = 4; + left = 1; + right = 2; + }; + }; + + display = { + separator = ""; + key.width = 17; + }; + + # Box Drawing: ╭ ─ ╮ ╰ ╯ │ + modules = [ + # Title + { + type = "title"; + format = "{#1}╭─── {#}{user-name-colored}"; + } + + # System Information + { + type = "custom"; + format = "{#1}│ {#}System Information"; + } + { + type = "os"; + key = "{#separator}│ {#keys}󰍹 OS"; + } + { + type = "kernel"; + key = "{#separator}│ {#keys}󰒋 Kernel"; + } + { + type = "bootmgr"; + key = "{#separator}│ {#keys}󰒋 BootMGR"; + } + { + type = "uptime"; + key = "{#separator}│ {#keys}󰅐 Uptime"; + } + { + type = "packages"; + key = "{#separator}│ {#keys}󰏖 Packages"; + # format = "{all}"; + } + { + type = "custom"; + format = "{#1}│"; + } + + # Desktop Environment + { + type = "custom"; + format = "{#1}│ {#}Desktop Environment"; + } + { + type = "de"; + key = "{#separator}│ {#keys}󰧨 DE"; + } + { + type = "wm"; + key = "{#separator}│ {#keys}󱂬 WM"; + } + { + type = "wmtheme"; + key = "{#separator}│ {#keys}󰉼 Theme"; + } + { + type = "display"; + key = "{#separator}│ {#keys}󰹑 Resolution"; + } + { + type = "shell"; + key = "{#separator}│ {#keys}󰞷 Shell"; + } + { + type = "terminalfont"; + key = "{#separator}│ {#keys}󰛖 Font"; + } + { + type = "icons"; + key = "{#separator}│ {#keys} Icons"; + } + { + type = "cursor"; + key = "{#separator}│ {#keys}󰆽 Cursor"; + } + { + type = "custom"; + format = "{#1}│"; + } + + # Hardware Information + { + type = "custom"; + format = "{#1}│ {#}Hardware Information"; + } + { + type = "board"; + key = "{#separator}│ {#keys} Board"; + } + { + type = "cpu"; + key = "{#separator}│ {#keys}󰻠 CPU"; + } + { + type = "gpu"; + key = "{#separator}│ {#keys}󰢮 GPU"; + } + { + type = "memory"; + key = "{#separator}│ {#keys}󰍛 Memory"; + } + # { + # type = "disk"; + # key = "{#separator}│ {#keys}󰋊 Disk (/)"; + # folders = "/"; + # } + # { + # type = "disk"; + # key = "{#separator}│ {#keys}󰋊 Disk (~/Games)"; + # folders = "/home/christoph/Games"; + # } + { + type = "btrfs"; + key = "{#separator}│ {#keys}󰋊 BTRFS"; + } + { + type = "custom"; + format = "{#1}│"; + } + + # Colors Footer + { + type = "colors"; + key = "{#separator}╰─── {#1}"; + keyWidth = 6; + symbol = "circle"; + } + ]; + }; + }; + }; +} diff --git a/home/homemodules/fastfetch/options.nix b/home/homemodules/fastfetch/options.nix new file mode 100644 index 00000000..2682e7ef --- /dev/null +++ b/home/homemodules/fastfetch/options.nix @@ -0,0 +1,7 @@ +{ + lib, + mylib, + ... +}: { + enable = lib.mkEnableOption "Enable fastfetch"; +} diff --git a/home/homemodules/ssh/default.nix b/home/homemodules/ssh/default.nix new file mode 100644 index 00000000..9a1f9e40 --- /dev/null +++ b/home/homemodules/ssh/default.nix @@ -0,0 +1,70 @@ +{ + config, + nixosConfig, + lib, + mylib, + pkgs, + ... +}: let + inherit (config.homemodules) ssh color; +in { + options.homemodules.ssh = import ./options.nix {inherit lib mylib;}; + + config = lib.mkIf ssh.enable { + programs.ssh = { + enable = true; + enableDefaultConfig = false; + + matchBlocks = { + "*" = { + forwardAgent = false; + addKeysToAgent = "no"; + compression = true; + serverAliveInterval = 0; + serverAliveCountMax = 3; + hashKnownHosts = false; + userKnownHostsFile = "~/.ssh/known_hosts"; + controlMaster = "no"; + controlPath = "~/.ssh/master-%r@%n:%p"; + controlPersist = "no"; + }; + "nixinator" = { + port = 5432; + user = "christoph"; + hostname = "vps.chriphost.de"; + }; + "servenix" = { + user = "christoph"; + hostname = "local.chriphost.de"; + }; + "thinknix" = { + user = "christoph"; + hostname = "think.chriphost.de"; + }; + "vps" = { + user = "root"; + hostname = "vps.chriphost.de"; + }; + "mars" = { + user = "smchurla"; + hostname = "mars.cs.tu-dortmund.de"; + serverAliveInterval = 60; + localForwards = [ + { + # Resultbrowser + bind.port = 22941; + host.address = "127.0.0.1"; + host.port = 22941; + } + { + # Mysql + bind.port = 3306; + host.address = "127.0.0.1"; + host.port = 3306; + } + ]; + }; + }; + }; + }; +} diff --git a/home/homemodules/ssh/options.nix b/home/homemodules/ssh/options.nix new file mode 100644 index 00000000..cb58fb07 --- /dev/null +++ b/home/homemodules/ssh/options.nix @@ -0,0 +1,7 @@ +{ + lib, + mylib, + ... +}: { + enable = lib.mkEnableOption "Enable ssh"; +} diff --git a/home/homemodules/tmux/default.nix b/home/homemodules/tmux/default.nix new file mode 100644 index 00000000..5bfb4607 --- /dev/null +++ b/home/homemodules/tmux/default.nix @@ -0,0 +1,38 @@ +{ + config, + nixosConfig, + lib, + mylib, + pkgs, + ... +}: let + inherit (config.homemodules) tmux color; +in { + options.homemodules.tmux = import ./options.nix {inherit lib mylib;}; + + config = lib.mkIf tmux.enable { + programs.tmux = { + enable = true; + + clock24 = true; + escapeTime = 0; # Delay after pressing escape + # keyMode = "vi"; + terminal = "xterm-256color"; + + plugins = with pkgs; [ + { + plugin = tmuxPlugins.catppuccin; + extraConfig = '' + set -g @plugin 'catppuccin/tmux' + set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha + ''; + } + ]; + + extraConfig = '' + set -g default-terminal "xterm-256color" + set-option -ga terminal-overrides ",xterm-256color:Tc" + ''; + }; + }; +} diff --git a/home/homemodules/tmux/options.nix b/home/homemodules/tmux/options.nix new file mode 100644 index 00000000..9cbe13b0 --- /dev/null +++ b/home/homemodules/tmux/options.nix @@ -0,0 +1,7 @@ +{ + lib, + mylib, + ... +}: { + enable = lib.mkEnableOption "Enable tmux"; +}