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,35 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption;
inherit (builtins) concatStringsSep;
cfg = config.horseman.dots.hypr.hypridle;
username = config.horseman.username;
hypr = config.horseman.wm.hyprland.config;
in {
options = {
horseman.dots.hypr.hypridle = {
enable = mkEnableOption "~/.config/hypr/hypridle.conf";
};
};
config = mkIf cfg.enable {
home-manager.users.${username}.xdg.configFile."hypr/hypridle.conf".text = ''
general {
lock_cmd = ${hypr.sleep.lockCommand}
}
${concatStringsSep "\n\n" (map (lis: ''
listener {
timeout = ${toString lis.timeout}
on-timeout = ${lis.onTimeout}
on-resume = ${lis.onResume}
}
'')
hypr.sleep.listeners)}
'';
};
}

View file

@ -1,387 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf trivial strings mkEnableOption;
inherit (builtins) concatStringsSep elem genList elemAt length;
inherit (trivial) boolToString;
inherit (strings) floatToString;
cfg = config.horseman.dots.hypr.hyprland;
username = config.horseman.username;
hypr = config.horseman.wm.hyprland.config;
in {
options = {
horseman.dots.hypr.hyprland = {
enable = mkEnableOption "~/.config/hypr/hyprland.conf";
};
};
config = mkIf cfg.enable {
home-manager.users.${username}.xdg.configFile."hypr/hyprland.conf".text = ''
${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${
if (elem "m" kb.flags) # Mouse binds take one argument less
then ""
else ", ${kb.params}"
}")
hypr.keybindings.binds)}
${concatStringsSep "\n" (map (gs: toString gs) hypr.gestures.gestures)}
${concatStringsSep "\n\n" (map (sm: ''
bind${concatStringsSep "" sm.enterBind.flags} = ${concatStringsSep " " sm.enterBind.mods}, ${sm.enterBind.key}, submap, ${sm.name}
submap = ${sm.name}
${concatStringsSep "\n" (map (kb: "bind${concatStringsSep "" kb.flags} = ${concatStringsSep " " kb.mods}, ${kb.key}, ${kb.dispatcher}${
if (elem "m" kb.flags) # Mouse binds take one argument less
then ""
else ", ${kb.params}"
}")
sm.binds)}
bind${concatStringsSep "" sm.exitBind.flags} = ${concatStringsSep " " sm.exitBind.mods}, ${sm.exitBind.key}, submap, reset
submap = reset
'')
hypr.keybindings.submaps)}
${concatStringsSep "\n" (map (x: "exec-once = " + x) hypr.execOnce)}
${concatStringsSep "\n" (map (x: "env = " + x) hypr.env)}
general {
border_size = ${toString hypr.general.borderSize}
gaps_in = ${toString hypr.general.gapsIn}
gaps_out = ${toString hypr.general.gapsOut}
gaps_workspaces = ${toString hypr.general.gapsWorkspaces}
col.inactive_border = ${hypr.general.col.inactiveBorder}
col.active_border = ${hypr.general.col.activeBorder}
col.nogroup_border = ${hypr.general.col.nogroupBorder}
col.nogroup_border_active = ${hypr.general.col.nogroupBorderActive}
layout = ${hypr.general.layout}
no_focus_fallback = ${boolToString hypr.general.noFocusFallback}
resize_on_border = ${boolToString hypr.general.resizeOnBorder}
extend_border_grab_area = ${toString hypr.general.extendBorderGrabArea}
hover_icon_on_border = ${boolToString hypr.general.hoverIconOnBorder}
allow_tearing = ${boolToString hypr.general.allowTearing}
resize_corner = ${toString hypr.general.resizeCorner}
snap {
enabled = ${boolToString hypr.general.snap.enabled}
window_gap = ${toString hypr.general.snap.windowGap}
monitor_gap = ${toString hypr.general.snap.monitorGap}
border_overlap = ${boolToString hypr.general.snap.borderOverlap}
}
}
decoration {
rounding = ${toString hypr.decoration.rounding}
rounding_power = ${toString hypr.decoration.roundingPower}
active_opacity = ${toString hypr.decoration.activeOpacity}
inactive_opacity = ${toString hypr.decoration.inactiveOpacity}
fullscreen_opacity = ${toString hypr.decoration.fullscreenOpacity}
dim_inactive = ${boolToString hypr.decoration.dimInactive}
dim_strength = ${toString hypr.decoration.dimStrength}
dim_special = ${toString hypr.decoration.dimSpecial}
dim_around = ${toString hypr.decoration.dimAround}
screen_shader = ${toString hypr.decoration.screenShader}
border_part_of_window = ${boolToString hypr.decoration.borderPartOfWindow}
blur {
enabled = ${boolToString hypr.decoration.blur.enabled}
size = ${toString hypr.decoration.blur.size}
passes = ${toString hypr.decoration.blur.passes}
ignore_opacity = ${boolToString hypr.decoration.blur.ignoreOpacity}
new_optimizations = ${boolToString hypr.decoration.blur.newOptimizations}
xray = ${boolToString hypr.decoration.blur.xray}
noise = ${toString hypr.decoration.blur.noise}
contrast = ${toString hypr.decoration.blur.contrast}
brightness = ${toString hypr.decoration.blur.brightness}
vibrancy = ${toString hypr.decoration.blur.vibrancy}
vibrancy_darkness = ${toString hypr.decoration.blur.vibrancyDarkness}
special = ${boolToString hypr.decoration.blur.special}
popups = ${boolToString hypr.decoration.blur.popups}
popups_ignorealpha = ${toString hypr.decoration.blur.popupsIgnorealpha}
input_methods = ${boolToString hypr.decoration.blur.inputMethods}
input_methods_ignorealpha = ${toString hypr.decoration.blur.inputMethodsIgnorealpha}
}
shadow {
enabled = ${boolToString hypr.decoration.shadow.enabled}
range = ${toString hypr.decoration.shadow.range}
render_power = ${toString hypr.decoration.shadow.renderPower}
sharp = ${boolToString hypr.decoration.shadow.sharp}
ignore_window = ${boolToString hypr.decoration.shadow.ignoreWindow}
color = ${toString hypr.decoration.shadow.color}
${
if (hypr.decoration.shadow.colorInactive == null)
then ""
else "color_inactive = ${toString hypr.decoration.shadow.colorInactive}"
}
offset = ${toString hypr.decoration.shadow.offset.x} ${toString hypr.decoration.shadow.offset.y}
scale = ${toString hypr.decoration.shadow.scale}
}
}
animations {
enabled = ${boolToString hypr.animations.enabled}
workspace_wraparound = ${boolToString hypr.animations.workspaceWraparound}
${concatStringsSep "\n " (map (bez: "bezier = ${bez.name}, ${floatToString bez.startX}, ${floatToString bez.startY}, ${floatToString bez.endX}, ${floatToString bez.endY}") hypr.animations.beziers)}
${concatStringsSep "\n " (map (anim: "animation = ${anim.name}, ${toString anim.on}, ${floatToString anim.speed}, ${anim.curve}, ${anim.style}") hypr.animations.animations)}
}
input {
kb_model = ${toString hypr.input.kbModel}
kb_layout = ${toString hypr.input.kbLayout}
kb_variant = ${toString hypr.input.kbVariant}
kb_options = ${toString hypr.input.kbOptions}
kb_rules = ${toString hypr.input.kbRules}
kb_file = ${toString hypr.input.kbFile}
numlock_by_default = ${boolToString hypr.input.numlockByDefault}
resolve_binds_by_sym = ${boolToString hypr.input.resolveBindsBySym}
repeat_rate = ${toString hypr.input.repeatRate}
repeat_delay = ${toString hypr.input.repeatDelay}
sensitivity = ${toString hypr.input.sensitivity}
accel_profile = ${toString hypr.input.accelProfile}
force_no_accel = ${boolToString hypr.input.forceNoAccel}
left_handed = ${boolToString hypr.input.leftHanded}
scroll_points = ${toString hypr.input.scrollPoints}
scroll_method = ${toString hypr.input.scrollMethod}
scroll_button = ${toString hypr.input.scrollButton}
scroll_button_lock = ${boolToString hypr.input.scrollButtonLock}
scroll_factor = ${toString hypr.input.scrollFactor}
natural_scroll = ${boolToString hypr.input.naturalScroll}
follow_mouse = ${toString hypr.input.followMouse}
follow_mouse_threshold = ${toString hypr.input.followMouseThreshold}
focus_on_close = ${toString hypr.input.focusOnClose}
mouse_refocus = ${boolToString hypr.input.mouseRefocus}
float_switch_override_focus = ${toString hypr.input.floatSwitchOverrideFocus}
special_fallthrough = ${boolToString hypr.input.specialFallthrough}
off_window_axis_events = ${toString hypr.input.offWindowAxisEvents}
emulate_discrete_scroll = ${toString hypr.input.emulateDiscreteScroll}
touchpad {
disable_while_typing = ${boolToString hypr.input.touchpad.disableWhileTyping}
natural_scroll = ${boolToString hypr.input.touchpad.naturalScroll}
scroll_factor = ${toString hypr.input.touchpad.scrollFactor}
middle_button_emulation = ${boolToString hypr.input.touchpad.middleButtonEmulation}
tap_button_map = ${toString hypr.input.touchpad.tapButtonMap}
clickfinger_behavior = ${boolToString hypr.input.touchpad.clickfingerBehavior}
tap-to-click = ${boolToString hypr.input.touchpad.tapToClick}
drag_lock = ${toString hypr.input.touchpad.dragLock}
tap-and-drag = ${toString hypr.input.touchpad.tapAndDrag}
flip_x = ${boolToString hypr.input.touchpad.flipX}
flip_y = ${boolToString hypr.input.touchpad.flipY}
}
touchdevice {
transform = ${toString hypr.input.touchdevice.transform}
output = ${toString hypr.input.touchdevice.output}
enabled = ${boolToString hypr.input.touchdevice.enabled}
}
tablet {
transform = ${toString hypr.input.tablet.transform}
output = ${toString hypr.input.tablet.output}
region_position = ${toString hypr.input.tablet.regionPosition.x} ${toString hypr.input.tablet.regionPosition.y}
absolute_region_position = ${boolToString hypr.input.tablet.absoluteRegionPosition}
region_size = ${toString hypr.input.tablet.regionSize.x} ${toString hypr.input.tablet.regionSize.y}
relative_input = ${boolToString hypr.input.tablet.relativeInput}
left_handed = ${boolToString hypr.input.tablet.leftHanded}
active_area_size = ${toString hypr.input.tablet.activeAreaSize.x} ${toString hypr.input.tablet.activeAreaSize.y}
active_area_position = ${toString hypr.input.tablet.activeAreaPosition.x} ${toString hypr.input.tablet.activeAreaPosition.y}
}
}
gestures {
workspace_swipe_distance = ${toString hypr.gestures.workspaceSwipeDistance}
workspace_swipe_touch = ${boolToString hypr.gestures.workspaceSwipeTouch}
workspace_swipe_invert = ${boolToString hypr.gestures.workspaceSwipeInvert}
workspace_swipe_touch_invert = ${boolToString hypr.gestures.workspaceSwipeTouchInvert}
workspace_swipe_min_speed_to_force = ${toString hypr.gestures.workspaceSwipeMinSpeedToForce}
workspace_swipe_cancel_ratio = ${floatToString hypr.gestures.workspaceSwipeCancelRatio}
workspace_swipe_create_new = ${boolToString hypr.gestures.workspaceSwipeCreateNew}
workspace_swipe_direction_lock = ${boolToString hypr.gestures.workspaceSwipeDirectionLock}
workspace_swipe_direction_lock_threshold = ${toString hypr.gestures.workspaceSwipeDirectionLockThreshold}
workspace_swipe_forever = ${boolToString hypr.gestures.workspaceSwipeForever}
workspace_swipe_use_r = ${boolToString hypr.gestures.workspaceSwipeUseR}
}
group {
auto_group = ${boolToString hypr.group.autoGroup}
insert_after_current = ${boolToString hypr.group.insertAfterCurrent}
focus_removed_window = ${boolToString hypr.group.focusRemovedWindow}
drag_into_group = ${toString hypr.group.dragIntoGroup}
merge_groups_on_drag = ${boolToString hypr.group.mergeGroupsOnDrag}
merge_groups_on_groupbar = ${boolToString hypr.group.mergeGroupsOnGroupbar}
merge_floated_into_tiled_on_groupbar = ${boolToString hypr.group.mergeFloatedIntoTiledOnGroupbar}
group_on_movetoworkspace = ${boolToString hypr.group.groupOnMovetoworkspace}
col.border_active = ${toString hypr.group.col.borderActive}
col.border_inactive = ${toString hypr.group.col.borderInactive}
col.border_locked_active = ${toString hypr.group.col.borderLockedActive}
col.border_locked_inactive = ${toString hypr.group.col.borderLockedInactive}
groupbar {
enabled = ${boolToString hypr.group.groupbar.enabled}
font_family = ${toString hypr.group.groupbar.fontFamily}
font_size = ${toString hypr.group.groupbar.fontSize}
font_weight_active = ${toString hypr.group.groupbar.fontWeightActive}
font_weight_inactive = ${toString hypr.group.groupbar.fontWeightInactive}
gradients = ${boolToString hypr.group.groupbar.gradients}
height = ${toString hypr.group.groupbar.height}
indicator_gap = ${toString hypr.group.groupbar.indicatorGap}
indicator_height = ${toString hypr.group.groupbar.indicatorHeight}
stacked = ${boolToString hypr.group.groupbar.stacked}
priority = ${toString hypr.group.groupbar.priority}
render_titles = ${boolToString hypr.group.groupbar.renderTitles}
text_offset = ${toString hypr.group.groupbar.textOffset}
scrolling = ${boolToString hypr.group.groupbar.scrolling}
rounding = ${toString hypr.group.groupbar.rounding}
gradient_rounding = ${toString hypr.group.groupbar.gradientRounding}
round_only_edges = ${boolToString hypr.group.groupbar.roundOnlyEdges}
gradient_round_only_edges = ${boolToString hypr.group.groupbar.gradientRoundOnlyEdges}
text_color = ${toString hypr.group.groupbar.textColor}
col.active = ${toString hypr.group.groupbar.col.active}
col.inactive = ${toString hypr.group.groupbar.col.inactive}
col.locked_active = ${toString hypr.group.groupbar.col.lockedActive}
col.locked_inactive = ${toString hypr.group.groupbar.col.lockedInactive}
gaps_in = ${toString hypr.group.groupbar.gapsIn}
gaps_out = ${toString hypr.group.groupbar.gapsOut}
keep_upper_gap = ${boolToString hypr.group.groupbar.keepUpperGap}
}
}
misc {
disable_hyprland_logo = ${boolToString hypr.misc.disableHyprlandLogo}
disable_splash_rendering = ${boolToString hypr.misc.disableSplashRendering}
col.splash = ${toString hypr.misc.col.splash}
font_family = ${toString hypr.misc.fontFamily}
splash_font_family = ${toString hypr.misc.splashFontFamily}
force_default_wallpaper = ${toString hypr.misc.forceDefaultWallpaper}
vfr = ${toString hypr.misc.vfr}
vrr = ${toString hypr.misc.vrr}
mouse_move_enables_dpms = ${boolToString hypr.misc.mouseMoveEnablesDPMS}
key_press_enables_dpms = ${boolToString hypr.misc.keyPressEnablesDPMS}
always_follow_on_dnd = ${boolToString hypr.misc.alwaysFollowOnDnd}
layers_hog_keyboard_focus = ${boolToString hypr.misc.layersHogKeyboardFocus}
animate_manual_resizes = ${boolToString hypr.misc.animateManualResizes}
animate_mouse_windowdragging = ${boolToString hypr.misc.animateMouseWindowdragging}
disable_autoreload = ${boolToString hypr.misc.disableAutoreload}
enable_swallow = ${boolToString hypr.misc.enableSwallow}
swallow_regex = ${toString hypr.misc.swallowRegex}
swallow_exception_regex = ${toString hypr.misc.swallowExceptionRegex}
focus_on_activate = ${boolToString hypr.misc.focusOnActivate}
mouse_move_focuses_monitor = ${boolToString hypr.misc.mouseMoveFocusesMonitor}
allow_session_lock_restore = ${boolToString hypr.misc.allowSessionLockRestore}
background_color = ${toString hypr.misc.backgroundColor}
close_special_on_empty = ${boolToString hypr.misc.closeSpecialOnEmpty}
new_window_takes_over_fullscreen = ${toString hypr.misc.newWindowTakesOverFullscreen}
exit_window_retains_fullscreen = ${boolToString hypr.misc.exitWindowRetainsFullscreen}
initial_workspace_tracking = ${toString hypr.misc.initialWorkspaceTracking}
middle_click_paste = ${boolToString hypr.misc.middleClickPaste}
render_unfocused_fps = ${toString hypr.misc.renderUnfocusedFps}
disable_xdg_env_checks = ${boolToString hypr.misc.disableXdgEnvChecks}
disable_hyprland_guiutils_check = ${boolToString hypr.misc.disableHyprlandGuiUtilsCheck}
lockdead_screen_delay = ${toString hypr.misc.lockdeadScreenDelay}
enable_anr_dialog = ${boolToString hypr.misc.enableAnrDialog}
anr_missed_pings = ${toString hypr.misc.anrMissedPings}
}
binds {
pass_mouse_when_bound = ${boolToString hypr.binds.passMouseWhenBound}
scroll_event_delay = ${toString hypr.binds.scrollEventDelay}
workspace_back_and_forth = ${boolToString hypr.binds.workspaceBackAndForth}
hide_special_on_workspace_change = ${boolToString hypr.binds.hideSpecialOnWorkspaceChange}
allow_workspace_cycles = ${boolToString hypr.binds.allowWorkspaceCycles}
workspace_center_on = ${toString hypr.binds.workspaceCenterOn}
focus_preferred_method = ${toString hypr.binds.focusPreferredMethod}
ignore_group_lock = ${boolToString hypr.binds.ignoreGroupLock}
movefocus_cycles_fullscreen = ${boolToString hypr.binds.movefocusCyclesFullscreen}
movefocus_cycles_groupfirst = ${boolToString hypr.binds.movefocusCyclesGroupfirst}
disable_keybind_grabbing = ${boolToString hypr.binds.disableKeybindGrabbing}
window_direction_monitor_fallback = ${boolToString hypr.binds.windowDirectionMonitorFallback}
allow_pin_fullscreen = ${boolToString hypr.binds.allowPinFullscreen}
drag_threshold = ${toString hypr.binds.dragThreshold}
}
xwayland {
enabled = ${boolToString hypr.xwayland.enabled}
use_nearest_neighbor = ${boolToString hypr.xwayland.useNearestNeighbor}
force_zero_scaling = ${boolToString hypr.xwayland.forceZeroScaling}
create_abstract_socket = ${boolToString hypr.xwayland.createAbstractSocket}
}
opengl {
nvidia_anti_flicker = ${boolToString hypr.opengl.nvidiaAntiFlicker}
}
render {
direct_scanout = ${toString hypr.render.directScanout}
expand_undersized_textures = ${boolToString hypr.render.expandUndersizedTextures}
xp_mode = ${boolToString hypr.render.xpMode}
ctm_animation = ${toString hypr.render.ctmAnimation}
cm_fs_passthrough = ${toString hypr.render.cmFsPassthrough}
cm_enabled = ${boolToString hypr.render.cmEnabled}
send_content_type = ${boolToString hypr.render.sendContentType}
}
cursor {
sync_gsettings_theme = ${boolToString hypr.cursor.syncGsettingsTheme}
no_hardware_cursors = ${toString hypr.cursor.noHardwareCursors}
no_break_fs_vrr = ${toString hypr.cursor.noBreakFsVrr}
min_refresh_rate = ${toString hypr.cursor.minRefreshRate}
hotspot_padding = ${toString hypr.cursor.hotspotPadding}
inactive_timeout = ${toString hypr.cursor.inactiveTimeout}
no_warps = ${boolToString hypr.cursor.noWarps}
persistent_warps = ${boolToString hypr.cursor.persistentWarps}
warp_on_change_workspace = ${toString hypr.cursor.warpOnChangeWorkspace}
warp_on_toggle_special = ${toString hypr.cursor.warpOnToggleSpecial}
default_monitor = ${toString hypr.cursor.defaultMonitor}
zoom_factor = ${toString hypr.cursor.zoomFactor}
zoom_rigid = ${boolToString hypr.cursor.zoomRigid}
enable_hyprcursor = ${boolToString hypr.cursor.enableHyprcursor}
hide_on_key_press = ${boolToString hypr.cursor.hideOnKeyPress}
hide_on_touch = ${boolToString hypr.cursor.hideOnTouch}
use_cpu_buffer = ${toString hypr.cursor.useCpuBuffer}
warp_back_after_non_mouse_input = ${boolToString hypr.cursor.warpBackAfterNonMouseInput}
}
ecosystem {
no_update_news = ${boolToString hypr.ecosystem.noUpdateNews}
no_donation_nag = ${boolToString hypr.ecosystem.noDonationNag}
enforce_permissions = ${boolToString hypr.ecosystem.enforcePermissions}
}
dwindle {
pseudotile = ${boolToString hypr.dwindle.pseudotile}
preserve_split = ${boolToString hypr.dwindle.preserveSplit}
}
master {
new_status = ${toString hypr.master.newStatus}
}
${concatStringsSep "\n" (map (mon: "monitor = ${mon.output}, ${mon.resolution}@${mon.refreshRate}, ${toString mon.x}x${toString mon.y}, ${floatToString mon.scale}, transform, ${toString mon.transform}") hypr.monitors.displays)}
${
if hypr.monitors.defaultMonitor
then "monitor = ,preferred, auto, auto"
else ""
}
${concatStringsSep "\n" (map (wr: "windowrule = " + wr) hypr.windowrules)}
${concatStringsSep "\n" (map (ws: "workspace = " + ws) hypr.workspaces)}
${
concatStringsSep "\n" (
if hypr.monitors.bindWorkspaces == "interlaced"
then (map (x: "workspace = ${toString (x + 1)}, persistent:true, monitor:${(elemAt hypr.monitors.displays (x - ((length hypr.monitors.displays) * (x / (length hypr.monitors.displays))))).output}") (genList (x: x) 10))
else []
)
}
'';
};
}

View file

@ -1,76 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.horseman.dots.hypr.hyprlock;
username = config.horseman.username;
in {
options = {
horseman.dots.hypr.hyprlock = {
enable = mkEnableOption "~/.config/hypr/hyprlock.conf";
};
};
config = mkIf cfg.enable {
home-manager.users.${username}.xdg.configFile."hypr/hyprlock.conf".text = ''
$font = Monospace
general {
hide_cursor = false
}
animations {
enabled = true
bezier = linear, 1, 1, 0, 0
animation = fadeIn, 1, 5, linear
animation = fadeOut, 1, 5, linear
animation = inputFieldDots, 1, 2, linear
}
background {
monitor =
path = screenshot
blur_passes = 3
}
input-field {
monitor =
size = 20%, 5%
outline_thickness = 3
inner_color = rgba(0, 0, 0, 0.0) # no fill
outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
font_color = rgb(143, 143, 143)
fade_on_empty = false
rounding = 15
font_family = $font
placeholder_text = Input password...
fail_text = $PAMFAIL
dots_spacing = 0.3
position = 0, -20
halign = center
valign = center
}
label {
monitor =
text = $TIME
font_size = 90
font_family = $font
position = 0, -50
halign = center
valign = top
}
'';
};
}

View file

@ -1,34 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption;
inherit (builtins) concatStringsSep;
cfg = config.horseman.dots.hypr.hyprpaper;
username = config.horseman.username;
hypr = config.horseman.wm.hyprland.config;
in {
options = {
horseman.dots.hypr.hyprpaper = {
enable = mkEnableOption "~/.config/hypr/hyprpaper.conf";
};
};
config = mkIf cfg.enable {
home-manager.users.${username}.xdg.configFile."hypr/hyprpaper.conf".text = ''
${concatStringsSep "\n" (map (dis:
if dis.wallpaper != null
then ''
preload = ${dis.wallpaper}
wallpaper = ${dis.output}, ${dis.wallpaper}
''
else "")
hypr.monitors.displays)}
preload = /home/${username}/nix-config/misc/wallpaper.jpg
wallpaper = , /home/${username}/nix-config/misc/wallpaper.jpg
'';
};
}

View file

@ -3,10 +3,6 @@
./.warprc.nix
./.config/eza/theme.yml.nix
./.config/fuzzel/fuzzel.ini.nix
./.config/hypr/hypridle.conf.nix
./.config/hypr/hyprlock.conf.nix
./.config/hypr/hyprland.conf.nix
./.config/hypr/hyprpaper.conf.nix
./.config/kitty/kitty.conf.nix
./.config/wofi/style.css.nix
./.config/waybar/style.css.nix

57
flake.lock generated
View file

@ -87,7 +87,61 @@
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"nix-hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1767280655,
"narHash": "sha256-YmaYMduV5ko8zURUT1VLGDbVC1L/bxHS0NsiPoZ6bBM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d49d2543f02dbd789ed032188c84570d929223cb",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"nix-hyprland": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1767799636,
"narHash": "sha256-qBgbE4jC/VJaY86mNspzToyR08xacawAbMeZskejcJc=",
"path": "/home/horseman/Programming/nix-hyprland",
"type": "path"
},
"original": {
"path": "/home/horseman/Programming/nix-hyprland",
"type": "path"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1767325753,
"narHash": "sha256-yA/CuWyqm+AQo2ivGy6PlYrjZBQm7jfbe461+4HF2fo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "64049ca74d63e971b627b5f3178d95642e61cedd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1766201043,
"narHash": "sha256-eplAP+rorKKd0gNjV3rA6+0WMzb1X1i16F5m5pASnjA=",
@ -130,7 +184,8 @@
"inputs": {
"agenix": "agenix",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs",
"nix-hyprland": "nix-hyprland",
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager"
}
},

View file

@ -19,6 +19,10 @@
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-hyprland = {
url = "github:KoenDR06/nix-hyprland";
};
};
outputs = {
@ -27,6 +31,7 @@
home-manager,
plasma-manager,
agenix,
nix-hyprland,
...
} @ inputs: let
inherit (self) outputs;
@ -57,12 +62,12 @@
inherit inputs outputs lib;
};
modules = [
./lib
./modules
./dots
./machines/${host}/configuration.nix
home-manager.nixosModules.home-manager
agenix.nixosModules.default
nix-hyprland.nixosModules.default
{
home-manager.sharedModules = [plasma-manager.homeModules.plasma-manager];
}

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

View file

@ -3,6 +3,21 @@
../../modules
];
nix-hyprland = {
monitors = {
bindWorkspaces = "interlaced";
displays = [
{
output = "eDP-1";
x = 0;
y = 0;
bar = "top";
scale = 1.175; # Idk why hyprland doesn't think 1.25 is invalid but whatever.
}
];
};
};
config.horseman = {
dots.kitty.fontSize = 13;
@ -22,22 +37,7 @@
greeter.greetd.session = "Hyprland";
};
wm.hyprland = {
enable = true;
config = {
monitors.displays = [
{
output = "eDP-1";
x = 0;
y = 0;
bar = "top";
scale = 1.175; # Idk why hyprland doesn't think 1.25 is invalid but whatever.
}
];
monitors.bindWorkspaces = "interlaced";
};
};
wm.hyprland.enable = true;
hardware = {
audio.enable = true;

View file

@ -1,8 +1,30 @@
{...}: {
{config, ...}: {
imports = [
../../modules
];
config.nix-hyprland = {
username = config.horseman.username;
monitors = {
displays = [
{
output = "DP-2";
x = 0;
y = 0;
wallpaper = ../../misc/landscape.png;
}
{
output = "DP-3";
x = -1440;
y = 0;
transform = 1;
wallpaper = ../../misc/portrait.png;
}
];
bindWorkspaces = "interlaced";
};
};
config.horseman = {
catppuccin.flavor = "mocha";
@ -24,28 +46,6 @@
wm.hyprland = {
enable = true;
config = {
monitors = {
displays = [
{
output = "DP-2";
x = 0;
y = 0;
wallpaper = ../../misc/landscape.png;
}
{
output = "DP-3";
x = -1440;
y = 0;
transform = 1;
wallpaper = ../../misc/portrait.png;
bar = "top";
}
];
bindWorkspaces = "interlaced";
};
};
};
hardware = {

View file

@ -7,7 +7,7 @@
cfg = config.horseman.wm.hyprland;
in {
config = mkIf cfg.enable {
horseman.wm.hyprland.config = {
nix-hyprland = {
animations = {
enabled = true;
beziers = [
@ -51,103 +51,87 @@ in {
animations = [
{
name = "global";
on = true;
speed = 10.0;
curve = "default";
}
{
name = "border";
on = true;
speed = 5.39;
curve = "easeOutQuint";
}
{
name = "windows";
on = true;
speed = 4.79;
curve = "easeOutQuint";
}
{
name = "windowsIn";
on = true;
speed = 4.1;
curve = "easeOutQuint";
style = "popin 87%";
}
{
name = "windowsOut";
on = true;
speed = 1.49;
curve = "linear";
style = "popin 87%";
}
{
name = "fadeIn";
on = true;
speed = 1.73;
curve = "almostLinear";
}
{
name = "fadeOut";
on = true;
speed = 1.46;
curve = "almostLinear";
}
{
name = "fade";
on = true;
speed = 3.03;
curve = "quick";
}
{
name = "layers";
on = true;
speed = 3.81;
curve = "easeOutQuint";
}
{
name = "layersIn";
on = true;
speed = 4.0;
curve = "easeOutQuint";
style = "fade";
}
{
name = "layersOut";
on = true;
speed = 1.5;
curve = "linear";
style = "fade";
}
{
name = "fadeLayersIn";
on = true;
speed = 1.79;
curve = "almostLinear";
}
{
name = "fadeLayersOut";
on = true;
speed = 1.39;
curve = "almostLinear";
}
{
name = "workspaces";
on = true;
speed = 1.94;
curve = "almostLinear";
style = "fade";
}
{
name = "workspacesIn";
on = true;
speed = 1.21;
curve = "almostLinear";
style = "fade";
}
{
name = "workspacesOut";
on = true;
speed = 1.94;
curve = "almostLinear";
style = "fade";

View file

@ -45,7 +45,7 @@ in {
horseman.hardware.keyd.enable = true;
horseman.wm.hyprland.config = {
nix-hyprland = {
execOnce = [
"hypridle"
"hyprpaper"
@ -54,8 +54,14 @@ in {
];
env = [
"XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24"
{
name = "XCURSOR_SIZE";
value = "24";
}
{
name = "HYPRCURSOR_SIZE";
value = "24";
}
];
windowrules = [
@ -140,10 +146,10 @@ in {
dragIntoGroup = 1;
col = {
borderActive = config.horseman.wm.hyprland.config.general.col.activeBorder; # I don't wanna believe this can't be done better :(
borderInactive = config.horseman.wm.hyprland.config.general.col.inactiveBorder;
borderLockedActive = config.horseman.wm.hyprland.config.general.col.activeBorder;
borderLockedInactive = config.horseman.wm.hyprland.config.general.col.inactiveBorder;
borderActive = config.nix-hyprland.general.col.activeBorder; # I don't wanna believe this can't be done better :(
borderInactive = config.nix-hyprland.general.col.inactiveBorder;
borderLockedActive = config.nix-hyprland.general.col.activeBorder;
borderLockedInactive = config.nix-hyprland.general.col.inactiveBorder;
};
groupbar = {
@ -164,7 +170,7 @@ in {
};
monitors = {
defaultMonitor = true;
addDefault = true;
};
sleep = {

View file

@ -7,506 +7,504 @@
cfg = config.horseman.wm.hyprland;
in {
config = mkIf cfg.enable {
horseman.wm.hyprland.config = {
keybindings = {
submaps = [
{
name = "disable-all";
enterBind = {
flags = ["o"];
mods = ["SUPER"];
key = "ESCAPE";
};
exitBind = {
flags = ["o"];
mods = ["SUPER"];
key = "ESCAPE";
};
binds = [];
}
];
binds = [
{
flags = [];
mods = ["SUPER"];
key = "SPACE";
dispatcher = "exec";
params = "pkill fuzzel || fuzzel";
}
{
flags = [];
mods = ["SUPER"];
key = "B";
dispatcher = "exec";
params = "pkill waybar || waybar";
}
{
flags = [];
mods = ["SUPER"];
key = "RETURN";
dispatcher = "exec";
params = "kitty";
}
{
flags = [];
mods = ["SUPER"];
key = "Q";
dispatcher = "killactive";
params = "";
}
{
flags = [];
mods = [];
key = "F11";
dispatcher = "fullscreen";
params = "";
}
{
nix-hyprland.keybindings = {
submaps = [
{
name = "disable-all";
enterBind = {
flags = ["o"];
mods = ["SUPER"];
key = "L";
dispatcher = "exec";
params = "hyprlock";
}
{
flags = ["e"];
key = "ESCAPE";
};
exitBind = {
flags = ["o"];
mods = ["SUPER"];
key = "TAB";
dispatcher = "changegroupactive";
params = "f";
}
key = "ESCAPE";
};
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "TAB";
dispatcher = "changegroupactive";
params = "b";
}
{
flags = [];
mods = ["SUPER"];
key = "F";
dispatcher = "togglefloating";
params = "";
}
{
flags = [];
mods = ["SUPER"];
key = "T";
dispatcher = "togglegroup";
params = "";
}
binds = [];
}
];
{
flags = [];
mods = ["SUPER"];
key = "P";
dispatcher = "pin";
params = "";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "S";
dispatcher = "exec";
params = "hyprshot -m region --clipboard-only";
}
binds = [
{
flags = [];
mods = ["SUPER"];
key = "SPACE";
dispatcher = "exec";
params = "pkill fuzzel || fuzzel";
}
{
flags = [];
mods = ["SUPER"];
key = "H";
dispatcher = "movefocus";
params = "l";
}
{
flags = [];
mods = ["SUPER"];
key = "L";
dispatcher = "movefocus";
params = "r";
}
{
flags = [];
mods = ["SUPER"];
key = "K";
dispatcher = "movefocus";
params = "u";
}
{
flags = [];
mods = ["SUPER"];
key = "J";
dispatcher = "movefocus";
params = "d";
}
{
flags = [];
mods = ["SUPER"];
key = "B";
dispatcher = "exec";
params = "pkill waybar || waybar";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "H";
dispatcher = "movewindow";
params = "l";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "L";
dispatcher = "movewindow";
params = "r";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "K";
dispatcher = "movewindow";
params = "u";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "J";
dispatcher = "movewindow";
params = "d";
}
{
flags = [];
mods = ["SUPER"];
key = "RETURN";
dispatcher = "exec";
params = "kitty";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Left";
dispatcher = "moveactive";
params = "-50 0";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Right";
dispatcher = "moveactive";
params = "50 0";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Up";
dispatcher = "moveactive";
params = "0 -50";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Down";
dispatcher = "moveactive";
params = "0 50";
}
{
flags = [];
mods = ["SUPER"];
key = "Q";
dispatcher = "killactive";
params = "";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Left";
dispatcher = "resizeactive";
params = "-50 0";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Right";
dispatcher = "resizeactive";
params = "50 0";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Up";
dispatcher = "resizeactive";
params = "0 -50";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Down";
dispatcher = "resizeactive";
params = "0 50";
}
{
flags = [];
mods = [];
key = "F11";
dispatcher = "fullscreen";
params = "";
}
{
flags = ["o"];
mods = ["SUPER"];
key = "L";
dispatcher = "exec";
params = "hyprlock";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "TAB";
dispatcher = "changegroupactive";
params = "f";
}
{
flags = [];
mods = ["SUPER"];
key = "grave";
dispatcher = "togglespecialworkspace";
params = "";
}
{
flags = [];
mods = ["SUPER"];
key = "1";
dispatcher = "workspace";
params = "1";
}
{
flags = [];
mods = ["SUPER"];
key = "2";
dispatcher = "workspace";
params = "2";
}
{
flags = [];
mods = ["SUPER"];
key = "3";
dispatcher = "workspace";
params = "3";
}
{
flags = [];
mods = ["SUPER"];
key = "4";
dispatcher = "workspace";
params = "4";
}
{
flags = [];
mods = ["SUPER"];
key = "5";
dispatcher = "workspace";
params = "5";
}
{
flags = [];
mods = ["SUPER"];
key = "6";
dispatcher = "workspace";
params = "6";
}
{
flags = [];
mods = ["SUPER"];
key = "7";
dispatcher = "workspace";
params = "7";
}
{
flags = [];
mods = ["SUPER"];
key = "8";
dispatcher = "workspace";
params = "8";
}
{
flags = [];
mods = ["SUPER"];
key = "9";
dispatcher = "workspace";
params = "9";
}
{
flags = [];
mods = ["SUPER"];
key = "0";
dispatcher = "workspace";
params = "10";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "TAB";
dispatcher = "changegroupactive";
params = "b";
}
{
flags = [];
mods = ["SUPER"];
key = "F";
dispatcher = "togglefloating";
params = "";
}
{
flags = [];
mods = ["SUPER"];
key = "T";
dispatcher = "togglegroup";
params = "";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "grave";
dispatcher = "movetoworkspace";
params = "special";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "1";
dispatcher = "movetoworkspace";
params = "1";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "2";
dispatcher = "movetoworkspace";
params = "2";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "3";
dispatcher = "movetoworkspace";
params = "3";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "4";
dispatcher = "movetoworkspace";
params = "4";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "5";
dispatcher = "movetoworkspace";
params = "5";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "6";
dispatcher = "movetoworkspace";
params = "6";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "7";
dispatcher = "movetoworkspace";
params = "7";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "8";
dispatcher = "movetoworkspace";
params = "8";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "9";
dispatcher = "movetoworkspace";
params = "9";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "0";
dispatcher = "movetoworkspace";
params = "10";
}
{
flags = [];
mods = ["SUPER"];
key = "P";
dispatcher = "pin";
params = "";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "S";
dispatcher = "exec";
params = "hyprshot -m region --clipboard-only";
}
{
flags = ["e"];
mods = ["SUPER" "CONTROL"];
key = "Right";
dispatcher = "workspace";
params = "e+1";
}
{
flags = ["e"];
mods = ["SUPER" "CONTROL"];
key = "Left";
dispatcher = "workspace";
params = "e-1";
}
{
flags = [];
mods = ["SUPER"];
key = "H";
dispatcher = "movefocus";
params = "l";
}
{
flags = [];
mods = ["SUPER"];
key = "L";
dispatcher = "movefocus";
params = "r";
}
{
flags = [];
mods = ["SUPER"];
key = "K";
dispatcher = "movefocus";
params = "u";
}
{
flags = [];
mods = ["SUPER"];
key = "J";
dispatcher = "movefocus";
params = "d";
}
{
flags = ["m"];
mods = ["SUPER"];
key = "mouse:272";
dispatcher = "movewindow";
params = "";
}
{
flags = ["m"];
mods = ["SUPER" "SHIFT"];
key = "mouse:272";
dispatcher = "resizewindow";
params = "";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "H";
dispatcher = "movewindow";
params = "l";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "L";
dispatcher = "movewindow";
params = "r";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "K";
dispatcher = "movewindow";
params = "u";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "J";
dispatcher = "movewindow";
params = "d";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioRaiseVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioLowerVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-";
}
{
flags = ["e" "l"];
mods = ["SHIFT"];
key = "XF86AudioRaiseVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%+";
}
{
flags = ["e" "l"];
mods = ["SHIFT"];
key = "XF86AudioLowerVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%-";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMute";
dispatcher = "exec";
params = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMicMute";
dispatcher = "exec";
params = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86MonBrightnessUp";
dispatcher = "exec";
params = "brightnessctl s 10%+";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86MonBrightnessDown";
dispatcher = "exec";
params = "brightnessctl s 10%-";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioNext";
dispatcher = "exec";
params = "playerctl next";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioPause";
dispatcher = "exec";
params = "playerctl play-pause";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioPlay";
dispatcher = "exec";
params = "playerctl play-pause";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioPrev";
dispatcher = "exec";
params = "playerctl previous";
}
];
};
{
flags = ["e"];
mods = ["SUPER"];
key = "Left";
dispatcher = "moveactive";
params = "-50 0";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Right";
dispatcher = "moveactive";
params = "50 0";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Up";
dispatcher = "moveactive";
params = "0 -50";
}
{
flags = ["e"];
mods = ["SUPER"];
key = "Down";
dispatcher = "moveactive";
params = "0 50";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Left";
dispatcher = "resizeactive";
params = "-50 0";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Right";
dispatcher = "resizeactive";
params = "50 0";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Up";
dispatcher = "resizeactive";
params = "0 -50";
}
{
flags = ["e"];
mods = ["SUPER" "SHIFT"];
key = "Down";
dispatcher = "resizeactive";
params = "0 50";
}
{
flags = [];
mods = ["SUPER"];
key = "grave";
dispatcher = "togglespecialworkspace";
params = "";
}
{
flags = [];
mods = ["SUPER"];
key = "1";
dispatcher = "workspace";
params = "1";
}
{
flags = [];
mods = ["SUPER"];
key = "2";
dispatcher = "workspace";
params = "2";
}
{
flags = [];
mods = ["SUPER"];
key = "3";
dispatcher = "workspace";
params = "3";
}
{
flags = [];
mods = ["SUPER"];
key = "4";
dispatcher = "workspace";
params = "4";
}
{
flags = [];
mods = ["SUPER"];
key = "5";
dispatcher = "workspace";
params = "5";
}
{
flags = [];
mods = ["SUPER"];
key = "6";
dispatcher = "workspace";
params = "6";
}
{
flags = [];
mods = ["SUPER"];
key = "7";
dispatcher = "workspace";
params = "7";
}
{
flags = [];
mods = ["SUPER"];
key = "8";
dispatcher = "workspace";
params = "8";
}
{
flags = [];
mods = ["SUPER"];
key = "9";
dispatcher = "workspace";
params = "9";
}
{
flags = [];
mods = ["SUPER"];
key = "0";
dispatcher = "workspace";
params = "10";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "grave";
dispatcher = "movetoworkspace";
params = "special";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "1";
dispatcher = "movetoworkspace";
params = "1";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "2";
dispatcher = "movetoworkspace";
params = "2";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "3";
dispatcher = "movetoworkspace";
params = "3";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "4";
dispatcher = "movetoworkspace";
params = "4";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "5";
dispatcher = "movetoworkspace";
params = "5";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "6";
dispatcher = "movetoworkspace";
params = "6";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "7";
dispatcher = "movetoworkspace";
params = "7";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "8";
dispatcher = "movetoworkspace";
params = "8";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "9";
dispatcher = "movetoworkspace";
params = "9";
}
{
flags = [];
mods = ["SUPER" "SHIFT"];
key = "0";
dispatcher = "movetoworkspace";
params = "10";
}
{
flags = ["e"];
mods = ["SUPER" "CONTROL"];
key = "Right";
dispatcher = "workspace";
params = "e+1";
}
{
flags = ["e"];
mods = ["SUPER" "CONTROL"];
key = "Left";
dispatcher = "workspace";
params = "e-1";
}
{
flags = ["m"];
mods = ["SUPER"];
key = "mouse:272";
dispatcher = "movewindow";
params = "";
}
{
flags = ["m"];
mods = ["SUPER" "SHIFT"];
key = "mouse:272";
dispatcher = "resizewindow";
params = "";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioRaiseVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioLowerVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%-";
}
{
flags = ["e" "l"];
mods = ["SHIFT"];
key = "XF86AudioRaiseVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%+";
}
{
flags = ["e" "l"];
mods = ["SHIFT"];
key = "XF86AudioLowerVolume";
dispatcher = "exec";
params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 1%-";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMute";
dispatcher = "exec";
params = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86AudioMicMute";
dispatcher = "exec";
params = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86MonBrightnessUp";
dispatcher = "exec";
params = "brightnessctl s 10%+";
}
{
flags = ["e" "l"];
mods = [];
key = "XF86MonBrightnessDown";
dispatcher = "exec";
params = "brightnessctl s 10%-";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioNext";
dispatcher = "exec";
params = "playerctl next";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioPause";
dispatcher = "exec";
params = "playerctl play-pause";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioPlay";
dispatcher = "exec";
params = "playerctl play-pause";
}
{
flags = ["l"];
mods = [];
key = "XF86AudioPrev";
dispatcher = "exec";
params = "playerctl previous";
}
];
};
};
}

View file

@ -11,217 +11,30 @@
cfg = config.horseman.wm.hyprland;
homeCfg = config.horseman;
keybinding = types.submodule {
options = {
flags = mkOption {
type = types.listOf (types.enum ["l" "r" "c" "g" "o" "e" "m" "t" "i" "s" "d" "p"]);
};
mods = mkOption {
type = types.listOf types.str;
};
key = mkOption {
type = types.str;
};
dispatcher = mkOption {
type = types.str;
};
params = mkOption {
type = types.str;
};
};
};
submapKeybinding = types.submodule {
options = {
flags = mkOption {
type = types.listOf (types.enum ["l" "r" "c" "g" "o" "e" "m" "t" "i" "s" "d" "p"]);
};
mods = mkOption {
type = types.listOf types.str;
};
key = mkOption {
type = types.str;
};
};
};
vec2 = types.submodule {
options = {
x = mkOption {type = types.int;};
y = mkOption {type = types.int;};
};
};
fontWeight = types.enum ["thin" "ultralight" "light" "semilight" "book" "normal" "medium" "semibold" "bold" "ultrabold" "heavy" "ultraheavy"];
in {
options.horseman.wm.hyprland.config = {
execOnce = mkOption {
type = types.listOf types.str;
default = [];
};
env = mkOption {
type = types.listOf types.str;
default = [];
};
windowrules = mkOption {
type = types.listOf types.str;
default = [];
};
workspaces = mkOption {
type = types.listOf types.str;
default = [];
};
animations = {
beziers = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {type = types.str;};
startX = mkOption {type = types.number;};
startY = mkOption {type = types.number;};
endX = mkOption {type = types.number;};
endY = mkOption {type = types.number;};
};
});
options.horseman.wm.hyprland.config.waybar = {
layout = {
horizontal = {
left = mkOption {type = types.listOf types.str;};
center = mkOption {type = types.listOf types.str;};
right = mkOption {type = types.listOf types.str;};
};
animations = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {type = types.str;};
on = mkOption {type = types.bool;};
speed = mkOption {
type = types.number;
default = 0;
};
curve = mkOption {
type = types.str;
default = "";
};
style = mkOption {
type = types.str;
default = "";
};
};
});
vertical = {
left = mkOption {type = types.listOf types.str;};
center = mkOption {type = types.listOf types.str;};
right = mkOption {type = types.listOf types.str;};
};
};
dwindle = {
pseudotile = mkOption {type = types.bool;};
preserveSplit = mkOption {type = types.bool;};
};
master = {
newStatus = mkOption {type = types.enum ["master" "slave" "inherit"];};
};
monitors = {
defaultMonitor = mkOption {type = types.bool;};
bindWorkspaces = mkOption {
type = types.enum ["no" "interlaced"];
default = "no";
};
displays = mkOption {
type = types.listOf (types.submodule {
options = {
output = mkOption {type = types.str;};
resolution = mkOption {
type = types.str;
default = "highres";
};
refreshRate = mkOption {
type = types.str;
default = "highrr";
};
x = mkOption {type = types.int;};
y = mkOption {type = types.int;};
scale = mkOption {
type = types.number;
default = 1;
};
transform = mkOption {
type = types.enum [0 1 2 3 4 5 6 7];
default = 0;
};
wallpaper = mkOption {
type = types.nullOr types.path;
default = null;
};
bar = mkOption {
type = types.enum ["" "left" "right" "top" "bottom"];
default = "";
};
};
});
};
};
keybindings = {
binds = mkOption {type = types.listOf keybinding;};
submaps = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {type = types.str;};
enterBind = mkOption {type = submapKeybinding;};
exitBind = mkOption {type = submapKeybinding;};
binds = mkOption {type = types.listOf keybinding;};
};
});
};
};
sleep = {
lockCommand = mkOption {type = types.str;};
listeners = mkOption {
type = types.listOf (types.submodule {
options = {
timeout = mkOption {type = types.ints.positive;};
onTimeout = mkOption {type = types.str;};
onResume = mkOption {
type = types.str;
default = "";
};
ignoreInhibit = mkOption {
type = types.bool;
default = false;
};
};
});
};
};
waybar = {
layout = {
horizontal = {
left = mkOption {type = types.listOf types.str;};
center = mkOption {type = types.listOf types.str;};
right = mkOption {type = types.listOf types.str;};
};
vertical = {
left = mkOption {type = types.listOf types.str;};
center = mkOption {type = types.listOf types.str;};
right = mkOption {type = types.listOf types.str;};
};
};
formats = {
horizontal = mkOption {
type = types.attrs;
};
vertical = mkOption {
type = types.attrs;
};
};
modules = mkOption {
formats = {
horizontal = mkOption {
type = types.attrs;
};
vertical = mkOption {
type = types.attrs;
};
};
modules = mkOption {
type = types.attrs;
};
};
@ -229,12 +42,6 @@ in {
horseman.dots = {
fuzzel.enable = true;
waybar.enable = true;
hypr = {
hyprland.enable = true;
hypridle.enable = true;
hyprpaper.enable = true;
hyprlock.enable = true;
};
};
home-manager.users.${homeCfg.username} = {
@ -248,7 +55,7 @@ in {
if (disp.bar == location)
then disp.output
else null)
cfg.config.monitors.displays
config.nix-hyprland.monitors.displays
)
);
in {