From bd4dd7ba23b52b77a1213be24e36f611a2f306bb Mon Sep 17 00:00:00 2001 From: lucalise Date: Thu, 29 Jan 2026 17:20:25 -0800 Subject: [PATCH] feat(homelab): migrate server to fabric --- nix/homelab/helm/values/minecraft/main.yaml | 9 +++++--- nix/modules/desktop.nix | 25 ++++++++++++++++++++- scripts/layout.sh | 18 +++++++++++++++ 3 files changed, 48 insertions(+), 4 deletions(-) create mode 100755 scripts/layout.sh diff --git a/nix/homelab/helm/values/minecraft/main.yaml b/nix/homelab/helm/values/minecraft/main.yaml index 01978c3..0b40787 100644 --- a/nix/homelab/helm/values/minecraft/main.yaml +++ b/nix/homelab/helm/values/minecraft/main.yaml @@ -8,7 +8,7 @@ resources: minecraftServer: eula: "TRUE" - type: "PAPER" + type: "FABRIC" version: "1.21.11" difficulty: hard motd: "A Minecraft Server." @@ -21,8 +21,11 @@ minecraftServer: secretKey: rcon-password modrinth: projects: - - treeminer - - fast-leaf-decay + - fabric-api + - tree-vein-miner + - lithium + - servux + - ferrite-core nodeSelector: kubernetes.io/hostname: kube diff --git a/nix/modules/desktop.nix b/nix/modules/desktop.nix index b79b9a4..dc8454a 100644 --- a/nix/modules/desktop.nix +++ b/nix/modules/desktop.nix @@ -14,6 +14,15 @@ }; config = lib.mkIf config.desktop.enable { + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + environment.systemPackages = with pkgs; [ vscode-fhs pavucontrol @@ -111,6 +120,14 @@ }; xdg.configFile = { "hypr/hyprlock.conf".source = ../../custom/hyprlock/hyprlock.conf; + "fcitx5/config".text = '' + [Hotkey] + TriggerKeys= + EnumerateWithTriggerKeys=True + EnumerateForwardKeys= + EnumerateBackwardKeys= + EnumerateSkipFirst=False + ''; }; services.dunst = { enable = true; @@ -210,6 +227,8 @@ "$mod SHIFT, v, exec, bash -c ~/dotfiles/scripts/copy.sh" "$mod SHIFT, s, exec, bash -c ~/dotfiles/scripts/screenshot.sh" "$mod, p, exec, bash -c ~/dotfiles/scripts/project.sh" + "$mod SHIFT, k, exec, bash -c ~/dotfiles/scripts/layout.sh" + "$mod SHIFT, j, exec, fcitx5-remote -t" "$mod, 0, workspace, 10" "$mod SHIFT, 0, movetoworkspacesilent, 10" @@ -257,17 +276,21 @@ "XCURSOR_SIZE,24" "LIBVA_DRIVER_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia" + # "GTK_IM_MODULE,fcitx" + # "QT_IM_MODULE,fcitx" + "XMODIFIERS,@im=fcitx" ]; exec-once = [ # "status-bar" "qs" "wl-clip-persist --clipboard regular" + "fcitx5 -d" ]; monitor = [ "eDP-1, 1920x1080, 0x0, 1" ]; input = { - kb_layout = "us"; + kb_layout = "us,jp"; touchpad = { natural_scroll = true; }; diff --git a/scripts/layout.sh b/scripts/layout.sh new file mode 100755 index 0000000..5b11aba --- /dev/null +++ b/scripts/layout.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Rofi-based keyboard layout switcher for Hyprland + +layouts="🇨🇦 Canadian (CA) +🇯🇵 Japanese (JP)" + +selected=$(echo "$layouts" | rofi -dmenu -p "Layout") + +case "$selected" in + *"Canadian"*) + hyprctl switchxkblayout all 0 + notify-send -h string:synchronous:keyboard "Keyboard" "🇨🇦 Canadian (CA)" + ;; + *"Japanese"*) + hyprctl switchxkblayout all 1 + notify-send -h string:synchronous:keyboard "Keyboard" "🇯🇵 Japanese (JP)" + ;; +esac