From c1d56759274cde6f023ae01cac1dc6a7ac1202bf Mon Sep 17 00:00:00 2001 From: Timo Boomers Date: Fri, 9 May 2025 08:40:34 +0200 Subject: [PATCH] Added wezterm and added aliases for justfile --- hosts/ch-clt-dsk01/home.nix | 1 + hosts/ti-clt-dsk01/default.nix | 5 ++ hosts/ti-clt-dsk01/home.nix | 7 ++ hosts/ti-clt-lpt01/home.nix | 1 + hosts/ti-clt-tbl01/home.nix | 1 + hosts/v-th-ctr-01/home.nix | 1 + justfile | 6 ++ modules/home/applications/wezterm.nix | 107 ++++++++++++++++++++++++++ modules/home/default.nix | 1 + modules/home/theming/stylix.nix | 1 + 10 files changed, 131 insertions(+) create mode 100644 modules/home/applications/wezterm.nix diff --git a/hosts/ch-clt-dsk01/home.nix b/hosts/ch-clt-dsk01/home.nix index 0c6b6ab..ca6ef97 100644 --- a/hosts/ch-clt-dsk01/home.nix +++ b/hosts/ch-clt-dsk01/home.nix @@ -24,6 +24,7 @@ applications.thunderbird.enable = false; applications.yazi.enable = false; applications.zellij.enable = false; + applications.wezterm.enable = false; services.nextcloud-sync.enable = false; diff --git a/hosts/ti-clt-dsk01/default.nix b/hosts/ti-clt-dsk01/default.nix index 90b4e20..c6324b6 100644 --- a/hosts/ti-clt-dsk01/default.nix +++ b/hosts/ti-clt-dsk01/default.nix @@ -88,6 +88,11 @@ "vault.local.tbmrs.nl" "paperless.local.tbmrs.nl" "monitor.local.tbmrs.nl" + "files.tbmrs.nl" + "syncthing.local.tbmrs.nl" + "home-assistant.local.tbmrs.nl" + "karakeep.local.tbmrs.nl" + "vikunja.local.tbmrs.nl" ]; }; diff --git a/hosts/ti-clt-dsk01/home.nix b/hosts/ti-clt-dsk01/home.nix index 1ec5e40..f41fa7c 100644 --- a/hosts/ti-clt-dsk01/home.nix +++ b/hosts/ti-clt-dsk01/home.nix @@ -24,6 +24,7 @@ applications.thunderbird.enable = true; applications.yazi.enable = true; applications.zellij.enable = true; + applications.wezterm.enable = true; services.nextcloud-sync.enable = true; @@ -46,11 +47,17 @@ unstable.freecad unstable.hoppscotch unstable.signal-desktop + unstable.ladybird + unstable.prusa-slicer unstable.surfer # waveform viewer # Office libreoffice + + # Scripts + wl-clipboard-rs + (import ../../modules/scripts/save_image.nix { inherit pkgs; }) ]; # Enable home-manager diff --git a/hosts/ti-clt-lpt01/home.nix b/hosts/ti-clt-lpt01/home.nix index d231f78..01a8fd0 100644 --- a/hosts/ti-clt-lpt01/home.nix +++ b/hosts/ti-clt-lpt01/home.nix @@ -24,6 +24,7 @@ applications.thunderbird.enable = true; applications.yazi.enable = true; applications.zellij.enable = true; + applications.wezterm.enable = true; services.nextcloud-sync.enable = true; diff --git a/hosts/ti-clt-tbl01/home.nix b/hosts/ti-clt-tbl01/home.nix index 1439603..7cf079e 100644 --- a/hosts/ti-clt-tbl01/home.nix +++ b/hosts/ti-clt-tbl01/home.nix @@ -24,6 +24,7 @@ applications.thunderbird.enable = false; applications.yazi.enable = true; applications.zellij.enable = false; + applications.wezterm.enable = false; services.nextcloud-sync.enable = true; diff --git a/hosts/v-th-ctr-01/home.nix b/hosts/v-th-ctr-01/home.nix index c0639a8..0e9c562 100644 --- a/hosts/v-th-ctr-01/home.nix +++ b/hosts/v-th-ctr-01/home.nix @@ -24,6 +24,7 @@ applications.thunderbird.enable = false; applications.yazi.enable = true; applications.zellij.enable = true; + applications.wezterm.enable = false; services.nextcloud-sync.enable = false; services.podman.enable = true; diff --git a/justfile b/justfile index 6641b5e..49de3ed 100644 --- a/justfile +++ b/justfile @@ -15,12 +15,18 @@ clean: fmt: nix fmt +alias s := switch + switch: sudo nixos-rebuild switch --flake . home-manager switch --flake . +alias sw := switch-system + switch-system: sudo nixos-rebuild switch --flake . +alias sh := switch-home-manager + switch-home-manager: home-manager switch --flake . diff --git a/modules/home/applications/wezterm.nix b/modules/home/applications/wezterm.nix new file mode 100644 index 0000000..71d9632 --- /dev/null +++ b/modules/home/applications/wezterm.nix @@ -0,0 +1,107 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.settings.applications.wezterm; +in { + options = { + settings.applications.wezterm.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Enable wezterm terminal + ''; + }; + }; + + config = mkIf cfg.enable { + programs.wezterm = { + enable = true; + enableZshIntegration = true; + package = pkgs.unstable.wezterm; + extraConfig = /* lua */ '' + -- Pull in the wezterm API + local wezterm = require 'wezterm' + + -- This will hold the configuration. + local config = wezterm.config_builder() + local act = wezterm.action + + -- This is where you actually apply your config choices + + -- For example, changing the color scheme: + config.enable_tab_bar = true + config.use_fancy_tab_bar = false + config.window_decorations = "NONE" + config.tab_bar_at_bottom = true + + config.keys = { + -- Pane controls + { + key = 'h', + mods = 'CTRL', + action = act.ActivatePaneDirection 'Left', + }, + { + key = 'l', + mods = 'CTRL', + action = act.ActivatePaneDirection 'Right', + }, + { + key = 'k', + mods = 'CTRL', + action = act.ActivatePaneDirection 'Up', + }, + { + key = 'j', + mods = 'CTRL', + action = act.ActivatePaneDirection 'Down', + }, + + -- Pane resizing + { + key = 'H', + mods = 'CTRL', + action = act.AdjustPaneSize { 'Left', 5 }, + }, + { + key = 'L', + mods = 'CTRL', + action = act.AdjustPaneSize { 'Right', 5 }, + }, + { + key = 'K', + mods = 'CTRL', + action = act.AdjustPaneSize { 'Up', 5 }, + }, + { + key = 'J', + mods = 'CTRL', + action = act.AdjustPaneSize { 'Down', 5 }, + }, + { + key = 'q', + mods = 'CTRL', + action = act.CloseCurrentPane { confirm = false }, + }, + + -- Tab management + { key = '1', mods = 'ALT', action = act.ActivateTab(0) }, + { key = '2', mods = 'ALT', action = act.ActivateTab(1) }, + { key = '3', mods = 'ALT', action = act.ActivateTab(2) }, + { key = '4', mods = 'ALT', action = act.ActivateTab(3) }, + { key = '5', mods = 'ALT', action = act.ActivateTab(4) }, + { + key = 'q', + mods = 'ALT', + action = act.CloseCurrentTab { confirm = false }, + }, + } + + -- and finally, return the configuration to wezterm + return config + ''; + }; + }; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index cdb3b4b..4602a67 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -13,6 +13,7 @@ ./applications/thunderbird.nix ./applications/yazi.nix ./applications/zellij.nix + ./applications/wezterm.nix ./services/nextcloud.nix ./services/podman.nix diff --git a/modules/home/theming/stylix.nix b/modules/home/theming/stylix.nix index efbd583..23dc43b 100644 --- a/modules/home/theming/stylix.nix +++ b/modules/home/theming/stylix.nix @@ -42,6 +42,7 @@ in { stylix.base16Scheme = lib.mkIf (cfg.theme != "theme") "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; stylix.autoEnable = true; + stylix.opacity.terminal = 0.95; stylix.cursor = { package = pkgs.phinger-cursors;