add nix-hyprland

This commit is contained in:
KoenDR06 2026-01-07 16:39:44 +01:00
parent 304570fd73
commit 954bf2d4ba
17 changed files with 619 additions and 2779 deletions

View file

@ -1,5 +0,0 @@
{...}: {
imports = [
./hyprland
];
}

View file

@ -1,6 +0,0 @@
{...}: {
imports = [
./standard-options.nix
./gestures.nix
];
}

View file

@ -1,61 +0,0 @@
{lib, ...}: let
inherit (lib) mkOption types;
inherit (builtins) concatStringsSep;
# v0.52.1
# gesture = fingers, direction, action, options
gesture =
types.submodule {
options = {
fingers = mkOption {
type = types.ints.positive;
};
direction = mkOption {
type = types.enum ["swipe" "horizontal" "vertical" "left" "right" "up" "down" "pinch" "pinchin" "pinchout"];
};
mods = mkOption {
type = types.listOf types.str;
default = [];
};
scale = mkOption {
type = types.numbers.positive;
default = 1;
};
action = mkOption {
type = types.enum ["dispatcher" "workspace" "move" "resize" "special" "close" "fullscreen" "float"];
};
options = mkOption {
type = types.listOf types.str;
default = [];
};
};
}
// {
};
in {
options.horseman.wm.hyprland.config = {
gestures.gestures = mkOption {
type = types.listOf gesture;
default = [];
apply = gs:
map (it:
it
// {
__toString = gs: "gesture = ${concatStringsSep ", " (
[
(toString gs.fingers)
(gs.direction)
]
++ map (it: "mod: ${it}") gs.mods
++ [
"scale: ${toString gs.scale}"
(gs.action)
]
++ gs.options
)}";
})
gs;
};
};
}

File diff suppressed because it is too large Load diff