This commit is contained in:
2026-08-02 23:53:38 +09:00
parent ac874a849e
commit aceb3d4808
6 changed files with 59 additions and 80 deletions
@@ -1,5 +1,6 @@
{ pkgs, ... }:
{
services.hazkey.enable = true;
i18n.inputMethod = {
@@ -8,6 +9,7 @@
fcitx5 = {
waylandFrontend = true;
addons = with pkgs; [
fcitx5-gtk
kdePackages.fcitx5-qt
@@ -17,14 +19,17 @@
settings = {
inputMethod = {
GroupOrder."0" = "Default";
"Groups/0" = {
Name = "Default";
"Default Layout" = "jp";
DefaultIM = "hazkey";
};
"Groups/0/Items/0" = {
Name = "keyboard-jp";
};
"Groups/0/Items/1" = {
Name = "hazkey";
};
@@ -38,37 +43,14 @@
ModifierOnlyKeyTimeout = 250;
};
"Hotkey/TriggerKeys" = {
"1" = "Zenkaku_Hankaku";
};
"Hotkey/ActivateKeys" = {
"0" = "Henkan";
};
"Hotkey/DeactivateKeys" = {
"0" = "Muhenkan";
};
"Hotkey/PrevPage" = {
"0" = "Up";
};
"Hotkey/NextPage" = {
"0" = "Down";
};
"Hotkey/PrevCandidate" = {
"0" = "Shift+Tab";
};
"Hotkey/NextCandidate" = {
"0" = "Tab";
};
"Hotkey/TogglePreedit" = {
"0" = "Control+Alt+P";
};
"Hotkey/TriggerKeys"."1" = "Zenkaku_Hankaku";
"Hotkey/ActivateKeys"."0" = "Henkan";
"Hotkey/DeactivateKeys"."0" = "Muhenkan";
"Hotkey/PrevPage"."0" = "Up";
"Hotkey/NextPage"."0" = "Down";
"Hotkey/PrevCandidate"."0" = "Shift+Tab";
"Hotkey/NextCandidate"."0" = "Tab";
"Hotkey/TogglePreedit"."0" = "Control+Alt+P";
Behavior = {
ActiveByDefault = false;
+1 -1
View File
@@ -2,5 +2,5 @@
{
description = "Fcitx 5 input method framework with Hazkey Japanese input";
imports.nixos = [ inputs.nix-hazkey.nixosModules.hazkey ];
imports.home = [ inputs.nix-hazkey.homeModules.hazkey ];
}
+42 -25
View File
@@ -1,5 +1,6 @@
{ lib, pkgs, ... }:
let
systemctl = lib.getExe' pkgs.systemd "systemctl";
action = key: name: {
"@key" = key;
action = {
@@ -74,7 +75,7 @@ in
};
desktops = {
"@number" = 9;
"@number" = 1;
"@popupTime" = 500;
"@prefix" = "Workspace";
};
@@ -85,19 +86,43 @@ in
keybind = [
(action "W-q" "Close")
(action "W-f" "ToggleMaximize")
(action "W-c" "Iconify")
(action "W-Tab" "NextWindow")
(action "W-S-Tab" "PreviousWindow")
(action "W-j" "NextWindow")
(action "W-k" "PreviousWindow")
(action "W-Up" "Lower")
(action "W-Down" "Raise")
(action "W-Left" "NextWindow")
(action "W-Right" "PreviousWindow")
{
"@key" = "W-a";
"@key" = "W-C-Left";
action = {
"@name" = "ShowMenu";
"@menu" = "client-list-combined-menu";
"@name" = "SnapToEdge";
"@direction" = "left";
"@combine" = "yes";
};
position = {
x = "center";
y = "center";
}
{
"@key" = "W-C-Right";
action = {
"@name" = "SnapToEdge";
"@direction" = "right";
"@combine" = "yes";
};
}
{
"@key" = "W-C-Up";
action = {
"@name" = "SnapToEdge";
"@direction" = "up";
"@combine" = "yes";
};
}
{
"@key" = "W-C-Down";
action = {
"@name" = "SnapToEdge";
"@direction" = "down";
"@combine" = "yes";
};
}
(execute "W-t" "ghostty")
@@ -147,21 +172,13 @@ in
"XKB_DEFAULT_LAYOUT=jp"
"XKB_DEFAULT_OPTIONS=ctrl:nocaps"
];
# Pull in graphical-session.target so Home Manager services such as
# portals, Vicinae, and the idle manager follow the labwc session.
systemd.extraCommands = [
# The wlroots portal is conditionally started with WAYLAND_DISPLAY. It
# can otherwise be skipped before labwc imports its session environment,
# leaving the desktop portal without the ScreenCast interface.
"${lib.getExe' pkgs.systemd "systemctl"} --user restart xdg-desktop-portal-wlr.service"
"${lib.getExe' pkgs.systemd "systemctl"} --user restart xdg-desktop-portal.service"
# Clear the previous session's target first. Otherwise services such as
# kanshi that lose their Wayland connection on logout remain in a
# failed/start-limit-hit state and are not started for the next login.
"${lib.getExe' pkgs.systemd "systemctl"} --user stop labwc-session.target"
"${lib.getExe' pkgs.systemd "systemctl"} --user --no-block start labwc-session.target"
];
};
xdg.configFile."labwc/autostart".text = lib.mkAfter ''
${systemctl} --user --no-block start labwc-session.target
'';
xdg.configFile."labwc/shutdown".text = lib.mkAfter ''
${systemctl} --user stop graphical-session.target
'';
}
-10
View File
@@ -7,14 +7,4 @@ in
enable = true;
package = unstable.labwc;
};
xdg.portal.config.labwc.default = [
"wlr"
"gtk"
];
environment.systemPackages = [
pkgs.wdisplays
pkgs.wlr-randr
];
}
+1 -13
View File
@@ -1,20 +1,8 @@
{ config, pkgs, ... }:
let
wdisplays = pkgs.wdisplays.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ [ ./wdisplays-canonical-scale.patch ];
});
in
{ config, ... }:
{
programs.niri.enable = true;
# niri-flake supplies the compositor package but does not register its
# user units with NixOS. Without this, Ly cannot start niri-session.
systemd.packages = [ config.programs.niri.package ];
environment.systemPackages = [
# Keep the transient Wayland-native GUI, with fractional scales rounded to
# the same wl_fixed_t value that niri receives on the first Apply.
wdisplays
pkgs.wlr-randr # Wayland output management CLI
];
}
+2
View File
@@ -32,5 +32,7 @@
environment.systemPackages = [
pkgs.xwayland-satellite
pkgs.uwsm
pkgs.wlr-randr
pkgs.wdisplays
];
}