diff --git a/configs/nixos/modules/desktop/apps/ghostty.nix b/configs/nixos/modules/desktop/apps/ghostty.nix index 2c86617..ecf4bf7 100644 --- a/configs/nixos/modules/desktop/apps/ghostty.nix +++ b/configs/nixos/modules/desktop/apps/ghostty.nix @@ -12,6 +12,11 @@ in options.modules.desktop.apps.ghostty.enable = lib.mkEnableOption "Ghostty as the desktop terminal"; config = lib.mkIf config.modules.desktop.apps.ghostty.enable { + registry.keybind.${config.networking.hostName}.ghostty = { + keys = "SUPER + Return"; + command = "${pkgs.ghostty}/bin/ghostty"; + }; + home-manager.users.${user}.home.packages = [ pkgs.ghostty ]; }; } diff --git a/configs/nixos/modules/desktop/session/hyprland/default.nix b/configs/nixos/modules/desktop/session/hyprland/default.nix index c412dee..4c3cb16 100644 --- a/configs/nixos/modules/desktop/session/hyprland/default.nix +++ b/configs/nixos/modules/desktop/session/hyprland/default.nix @@ -21,12 +21,6 @@ in options.modules.desktop.session.hyprland.enable = lib.mkEnableOption "the Hyprland compositor"; config = lib.mkIf config.modules.desktop.session.hyprland.enable { - registry.keybind.${config.networking.hostName} = { - hyprland-terminal = { - keys = "SUPER + Return"; - command = "ghostty"; - }; - }; # This program integration owns the session, portals, and polkit, launched # through the universal Wayland session manager. diff --git a/configs/nixos/registry/keybind.nix b/configs/nixos/registry/keybind.nix index 69560a6..b37400e 100644 --- a/configs/nixos/registry/keybind.nix +++ b/configs/nixos/registry/keybind.nix @@ -1,5 +1,11 @@ -{ lib, ... }: +{ lib, util, ... }: { + checks = [ + { + assertion = util.registry.predicates.uniqueValue (entry: entry.value.keys); + message = "Desktop keybinds must use unique key chords."; + } + ]; type = lib.types.submodule { options = {