Compare commits

..

2 commits

Author SHA1 Message Date
Daniel Bulant
f94ba1a7fa
update 2026-08-05 09:16:31 +02:00
Daniel Bulant
3c0afc8a99
hyprlua + disk 2026-07-31 14:18:13 +02:00
17 changed files with 14364 additions and 713 deletions

View file

@ -1,500 +0,0 @@
#env=LIBSEAT_BACKEND,seatd
# env = HYPRLAND_LOG_WLR,1
#env = WLR_DRM_DEVICES,$HOME/.config/hypr/nvidia:$HOME/.config/hypr/amd
#env = WLR_DRM_DEVICES,$HOME/.config/hypr/amd:$HOME/.config/hypr/nvidia
# env = WLR_DRM_DEVICES,$HOME/.config/hypr/amd-render:$HOME/.config/hypr/nvidia-render
#env = LIBVA_DRIVER_NAME,nvidia
#env = XDG_SESSION_TYPE,wayland
#env = GBM_BACKEND,nvidia-drm
#env = __GLX_VENDOR_LIBRARY_NAME,nvidia
#cursor { no_hardware_cursors = true }
# env = AQ_DRM_DEVICES,/dev/dri/card1
#env = AQ_NO_MODIFIERS,1
#monitor=,preferred,auto,1
#monitor=eDP-1,1920x1200@60.0,3564x0,1.0,cm,hdr,sdrbrightness,1.4,sdrsaturation,0.8,bitdepth,10
# Generated by nwg-displays on 2026-02-17 at 11:54:19. Do not edit manually.
#monitor=eDP-1,1920x1200@60.0,3564x0,1.0
#monitor=HDMI-A-1,2560x1440@144.0,1004x0,1.0
# env = LIBVA_DRIVER_NAME,nvidia
# env = XDG_SESSION_TYPE,wayland
# env = GBM_BACKEND,nvidia-drm
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
cursor {
no_hardware_cursors = true
}
#render {
#explicit_sync = false
#}
source = ~/.config/hypr/monitors.conf
source = ~/.config/hypr/workspaces.conf
#source = ~/.config/hypr/hyprland.colors.conf
monitor=desc:ASUSTek COMPUTER INC VG27AQL5A T7LMQS022027,2560x1440@144.0,0x0,1.0,bitdepth,10
monitor=eDP-1,1920x1200@60.0,2560x0,1.0,bitdepth,10,cm,srgb
debug:disable_logs = false
debug {
disable_logs = false
}
plugin {
hyprtrails {
color = rgba(ffaa00ff)
}
hyprexpo {
columns = 3
gap_size = 5
bg_col = rgb(111111)
workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1
# enable_gesture = true # laptop touchpad
# gesture_fingers = 3 # 3 or 4
# gesture_distance = 300 # how far is the "max"
# gesture_positive = true # positive = swipe down. Negative = swipe up.
}
}
# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_ENABLE_HIGHDPI_SCALING,1
env = QT_QPA_PLATFORM,wayland;xcb
env = XCURSOR_SIZE,24
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
#env = WLR_NO_HARDWARE_CURSORS,1
env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0
env = GDK_SCALE,1
env = GDK_BACKEND,wayland,x11
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = MOZ_ENABLE_WAYLAND,1
env = XDG_SESSION_DESKTOP,Hyprland
env = XDG_CURRENT_DESKTOP,Hyprland
env = QT_ENABLE_FONTCONFIG_CACHE,1
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Import the completed Hyprland session environment before launching long-lived helpers.
exec-once=dbus-update-activation-environment --systemd --all
exec-once=systemctl --user import-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE WLR_DRM_DEVICES LIBVA_DRIVER_NAME __GLX_VENDOR_LIBRARY_NAME QT_QPA_PLATFORM QT_QPA_PLATFORMTHEME GDK_BACKEND MOZ_ENABLE_WAYLAND PATH XDG_DATA_DIRS XDG_CONFIG_DIRS DBUS_SESSION_BUS_ADDRESS
# KDE auth agent
# exec-once=/usr/lib/polkit-kde-authentication-agent-1
exec-once = systemctl --user start hyprpolkitagent
exec-once=otd-daemon
exec-once=lorri daemon
exec-once=/etc/pam_init
#exec-once=wlsunset -S 6:00 -s 21:30
# exec-once=swaybg -m fill -i ~/.config/hypr/wallpapers/sunflowers.jpg
#exec-once = swww-daemon
# "$(cat ~/.local/state/quickshell/user/generated/wallpaper/path.txt)"
#exec-once = sleep 0.5; swww img ~/.config/hypr/wallpapers/sunflowers.jpg --transition-step 100 --transition-fps 120 --transition-type grow --transition-angle 30 --transition-duration 1
# exec-once=waybar
# exec-once=quickshell -c ii
exec-once=blueman-applet
# exec-once=dunst
exec-once=udev-block-notify
#exec-once=~/.config/hypr/scripts/sleep.sh
exec-once=echo us > /tmp/kb_layout
#exec-once=hyprctl setcursor Sweet 30
#exec-once=sleep 10;aw-qt& sleep 2; awatcher
exec-once = nm-applet --indicator # systray app for Network/Wifi
exec-once=kdeconnect-indicator
exec-once = hyprpm reload -n
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
exec-once = fcitx5
exec-once = easyeffects --gapplication-service
exec-once = voxtype daemon
exec-once = openrgb --startminimized
exec-once = dms run
#$swaylock = swaylock --screenshots --clock --indicator --effect-blur 6x6 --fade-in 0.2 --ring-color 4e9dc2 --key-hl-color 71b0ce
$swaylock = hyprlock
# exec-once=hypridle
# exec-once=swayidle -w timeout 300 '$swaylock --grace 2' before-sleep '$swaylock'
# Needs repackaging...
# exec-once=/usr/lib/pam_kwallet_init
#monitor=eDP-1,highrr,0x0,1.25
#monitor=eDP-2,highrr,0x0,1.25
#monitor=desc:AOC 24G2W1G4 0x0000297D,highrr,auto,1
#monitor=HDMI-A-1,highrr,2048x0,1
#monitor=HDMI-A-1,highrr,auto,1
#monitor=,preferred,auto,1
# TV frame
#monitor=HDMI-A-1,addreserved,50,50,50,50
#monitor=HDMI-A-1,preferred,auto,1,transform,2
#monitor=HDMI-A-1,preferred,auto,1,mirror,eDP-2
#workspace = 10,monitor:HDMI-A-1,default:true
xwayland {
force_zero_scaling = true
}
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout=us,cz
kb_variant=,qwerty
kb_model=
kb_options=grp:win_space_toggle
kb_rules=
numlock_by_default=trues
follow_mouse=1
float_switch_override_focus=true
touchpad {
natural_scroll = yes
}
touchdevice {
output = HDMI-A-1
transform = 2
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 10
border_size = 1
# col.active_border = rgba(75DDDD50) rgba(09BC8A50) 45deg
# col.inactive_border = rgba(172A3AFF)
layout = master
resize_on_border = true
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
blur {
enabled = true
size = 2
passes = 4
new_optimizations = on
ignore_opacity = on
# xray = true
}
# drop_shadow = yes
# shadow_range = 4
# shadow_render_power = 3
# col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = wind, 0.05, 0.9, 0.1, 1.05
bezier = winIn, 0.1, 1, 0.1, 1
bezier = winOut, 0.3, 0, 0, 1
bezier = liner, 1, 1, 1, 1
animation = windows, 1, 6, wind, slide
animation = windowsIn, 1, 6, winIn, popin 80%
animation = windowsOut, 1, 5, winOut, popin 80%
animation = windowsMove, 1, 5, wind, slide
animation = border, 1, 1, liner
animation = borderangle, 1, 30, liner, loop
animation = fade, 1, 10, default
animation = workspaces, 1, 5, wind
}
group {
groupbar {
# font_size = 10
# col.active = rgb(F7E733)
# col.inactive = rgba(F7E73330)
}
# col.border_active = rgba(75DDDDFF) rgba(75DDDD70) 45deg
# col.border_inactive = rgb(172A3A)
}
# dwindle {
# # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
# pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
# preserve_split = yes # you probably want this
# }
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
#new_is_master = false
}
#gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
# workspace_swipe = true
#}
gesture = 3, horizontal, workspace
gesture = 3, up, fullscreen
gesture = 3, down, fullscreen, maximize
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
#device:epic-mouse-v1 {
# sensitivity = -0.5
#}
misc {
disable_hyprland_logo=true
disable_splash_rendering=true
mouse_move_enables_dpms=true
}
#windowrule=float,class:blueman
#windowrule=float,class:Anydesk
#windowrule=float,class:file_progress
#windowrule=float,class:confirm
#windowrule=float,class:dialog
#windowrule=float,class:download
#windowrule=float,class:notification
#windowrule=float,class:error
#windowrule=float,class:splash
#windowrule=float,class:confirmreset
#windowrule=float,title:Open File
#windowrule=float,title:branchdialog
#windowrule=tile,title:*vivaldi*
# can be more specific (:bar, :mediaControls, etc)
layerrule = blur on, match:namespace quickshell:bar
layerrule = ignore_alpha .2, match:namespace quickshell:bar
layerrule = blur on, match:namespace quickshell:popup
layerrule = ignore_alpha .2, match:namespace quickshell:popup
layerrule = blur on, match:namespace quickshell:notificationPopup
layerrule = ignore_alpha .2, match:namespace quickshell:notificationPopup
layerrule = blur on, match:namespace quickshell:overview
layerrule = blur_popups on, match:namespace quickshell:overview
layerrule = ignore_alpha .2, match:namespace quickshell:overview
layerrule = blur on, match:namespace quickshell:sidebarLeft
layerrule = blur_popups on, match:namespace quickshell:sidebarLeft
layerrule = ignore_alpha .2, match:namespace quickshell:sidebarLeft
layerrule = blur on, match:namespace quickshell:sidebarRight
layerrule = blur_popups on, match:namespace quickshell:sidebarRight
layerrule = ignore_alpha .2, match:namespace quickshell:sidebarRight
layerrule {
name="blur dms"
match:namespace = dms:(color-picker|clipboard|spotlight|settings)
blur = on
ignore_alpha = 0
}
# layerrule = noanim, match:namespace ^(dms)$
blurls=gtk-layer-shell
blurls=lockscreen
blurls = rofi
$dir = ~/.config
#! quickshell
bindr = SUPER+ALT, R, exec, pkill rofi || $dir/rofi/bin/launcher
# bind = SUPER, r, global, quickshell:overviewSearchToggle
# bind = SUPER, r, exec, dms ipc call spotlight toggle
bind = SUPER+ALT, P, exec, pkill rofi || $dir/rofi/bin/powermenu
# bind = SUPER, p, exec, dms ipc call powermenu open
# bind = SUPER, tab, exec, dms ipc call hypr toggleOverview
# bind = SUPER, p, global, quickshell:sessionToggle
# bind = SUPER, m, global, quickshell:mediaControlsToggle
# bind = SUPER, grave, global, quickshell:sidebarLeftToggle
# bind = SUPER, b, global, quickshell:sidebarRightToggle
# bind = SUPER, slash, global, quickshell:cheatsheetToggle
# bind = SUPER, tab, global, quickshell:overviewToggle
# bindrt = SUPER, SUPER_L, global, quickshell:workspaceNumber
# bindd = Super, h, Clipboard history >> clipboard, global, quickshell:overviewClipboardToggle # Clipboard history >> clipboard
# bindd = Super, Period, Emoji >> clipboard, global, quickshell:overviewEmojiToggle # Emoji >> clipboard
bind = , XF86AudioRecord, exec, voxtype record-toggle
#bind = SUPER, O, exec, voxtype record-toggle
bind = SUPER, O, exec, voxtype record start
bindr = SUPER, O, exec, voxtype record stop
#bind = SUPER, V, exec, voxtype record start
#bindr = SUPER, V, exec, voxtype record stop
$mainMod = SUPER
#! programs
bind = $mainMod, T, exec, kitty
bind=$mainMod,K,exec,kitty
bind=SUPER,B,exec,vivaldi-stable
bind = super+ctrl, q, exit,
bind = $mainMod, E, exec, cosmic-files
bind = $mainMod+SHIFT, E, exec, dolphin
#! current window management
bind = $mainMod, Q, killactive,
# bind = $mainMod, V, togglefloating,
#bind = $mainMod, R, exec, rofi -show drun
#bind = $mainMod, P, pseudo, # dwindle
# bind = $mainMod, J, togglesplit, # dwindle
bind = SUPER, G, togglegroup
bind=SUPER,V,togglefloating,
bind=SUPER,F,fullscreen,
bind=SUPER,A,swapactiveworkspaces,current +1
# bind = SUPER, grave, hyprexpo:expo, toggle
#! media keys
bindle=, XF86MonBrightnessUp, exec, xbacklight -inc 10
bindle=, XF86MonBrightnessDown, exec, xbacklight -dec 10
# bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%+;canberra-gtk-play -i audio-volume-change -d "volumeChange"
# bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_SINK@ 5%-;canberra-gtk-play -i audio-volume-change -d "volumeChange"
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle
bindl=, XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle
bindl=, XF86AudioPlay, exec, playerctl play-pause # the stupid key is called play , but it toggles
bindl=, XF86AudioNext, exec, playerctl next
bindl=, XF86AudioPrev, exec, playerctl previous
#! focus
bind = SUPER+ALT, left, movefocus, l
bind = SUPER+ALT, right, movefocus, r
bind = SUPER+ALT, up, movefocus, u
bind = SUPER+ALT, down, movefocus, d
bind = SUPER+SHIFT, left,changegroupactive,b
bind = SUPER+SHIFT,right,changegroupactive,f
#! workspaces
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod+ALT, 1, workspace, 10
bind = $mainMod+ALT, 2, workspace, 11
bind = $mainMod+ALT, 3, workspace, 12
bind = $mainMod+ALT, 4, workspace, 13
bind = $mainMod+ALT, 5, workspace, 14
bind = $mainMod+ALT, 6, workspace, 15
bind = $mainMod+ALT, 7, workspace, 16
bind = $mainMod+ALT, 8, workspace, 17
bind = $mainMod+ALT, 9, workspace, 18
bind = $mainMod+ALT, 0, workspace, 19
bind = SUPER+CONTROL, right, workspace, +1
bind = SUPER+CONTROL, left, workspace, -1
bind = super+control+shift,left,movetoworkspace,-1
bind = super+control+shift,right,movetoworkspace,+1
#! window movement
bind = SUPER, right, movewindow, mon:+1
bind = SUPER, left, movewindow, mon:-1
bind = ALT, tab, cyclenext,
bind = ALT+SHIFT, tab, cyclenext, prev
#! screenshots
# bind = ,Print,exec,grim - | wl-copy
bind = ,Print,exec,hyprshot --clipboard-only --mode active --mode output
# bind = SUPER+SHIFT,S,exec,spectacle --copy-image --region --background # no gui
# bind = SUPER+SHIFT,S,exec,grim -g "$(slurp)" - | wl-copy
bind = SUPER+SHIFT,S,exec,hyprshot --freeze --clipboard-only --mode region
# bind = SUPER, L,exec,$swaylock
#! move windows to workspaces
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
#! mouse bindings
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = super alt, m, layoutmsg,swapwithmaster
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
#! global keybinds
bind = CTRL+ALT,1,pass,^(com\.obsproject\.Studio)$
bind = CTRL+ALT,2,pass,^(com\.obsproject\.Studio)$
#windowrulev2=opacity 0.9,class:Code
#windowrulev2=opacity 0.9,class:Spotify
#windowrulev2 = suppress_event maximize,class:^(vesktop)$
#windowrulev2=workspace 10,class:Code # Open Code on secondary monitor
#windowrulev2 = float,class:^(qt5ct)$
#windowrulev2 = float,class:^(nwg-look)$
#windowrulev2 = float,class:^(org.kde.ark)$
#windowrulev2 = float,class:^(Signal)$ #Signal-Gtk
#windowrulev2 = float,class:^(com.github.rafostar.Clapper)$ #Clapper-Gtk
#windowrulev2 = float,class:^(app.drey.Warp)$ #Warp-Gtk
#windowrulev2 = float,class:^(net.davidotek.pupgui2)$ #ProtonUp-Qt
#windowrulev2 = float,class:^(yad)$ #Protontricks-Gtk
#windowrulev2 = float,class:^(eog)$ #Imageviewer-Gtk
#windowrulev2 = float,class:^(io.gitlab.theevilskeleton.Upscaler)$ #Upscaler-Gtk
#windowrulev2 = float,class:^(pavucontrol)$
#windowrulev2 = float,class:^(blueman-manager)$
#windowrulev2 = float,class:^(nm-applet)$
#windowrulev2 = float,class:^(nm-connection-editor)$
#windowrulev2 = float,class:^(org.kde.polkit-kde-authentication-agent-1)$
#windowrulev2 = tile,class:dev.warp.Warp
# some themeing
exec = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
exec = gsettings set org.gnome.desktop.interface font-antialiasing 'rgba'
exec = gsettings set org.gnome.desktop.interface font-hinting 'full'
decoration {
dim_special = 0.3
blur {
special = true
}
}
#windowrule = nofullscreenrequest,flameshot
#windowrule = float,title:flameshot
#windowrule = monitor 1,title:flameshot
#windowrule = move 0 0,title:flameshot
#windowrule = noanim,title:flameshot
#enable once dms fixes config; uses old hyprland syntax
source = ~/.config/hypr/dms/colors.conf
source = ~/.config/hypr/dms/binds.conf
source = ~/.config/hypr/dms/layout.conf

223
.config/hypr/hyprland.lua Normal file
View file

@ -0,0 +1,223 @@
-- Hyprland 0.55+ Lua configuration.
-- https://wiki.hypr.land/Configuring/Start/
hl.config({ autogenerated = false })
-- Environment variables that must be present before the compositor starts.
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1")
hl.env("QT_ENABLE_HIGHDPI_SCALING", "1")
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
hl.env("XCURSOR_SIZE", "24")
hl.env("LIBVA_DRIVER_NAME", "nvidia")
hl.env("XDG_SESSION_TYPE", "wayland")
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
hl.env("WLR_DRM_DEVICES", "/dev/dri/card1:/dev/dri/card0")
hl.env("GDK_SCALE", "1")
hl.env("GDK_BACKEND", "wayland,x11")
hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1")
hl.env("MOZ_ENABLE_WAYLAND", "1")
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
hl.env("QT_ENABLE_FONTCONFIG_CACHE", "1")
hl.config({
cursor = { no_hardware_cursors = true },
debug = { disable_logs = false },
xwayland = { force_zero_scaling = true },
input = {
kb_layout = "us,cz",
kb_variant = ",qwerty",
kb_model = "",
kb_options = "grp:win_space_toggle",
kb_rules = "",
numlock_by_default = true,
follow_mouse = 1,
float_switch_override_focus = true,
sensitivity = 0,
touchpad = { natural_scroll = true },
touchdevice = { output = "HDMI-A-1", transform = 2 },
},
general = {
gaps_in = 5,
gaps_out = 10,
border_size = 1,
layout = "master",
resize_on_border = true,
},
decoration = {
rounding = 10,
dim_special = 0.3,
blur = {
enabled = true,
size = 2,
passes = 4,
new_optimizations = true,
ignore_opacity = true,
special = true,
},
},
animations = { enabled = true },
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
mouse_move_enables_dpms = true,
},
plugin = {
hyprtrails = { color = "rgba(ffaa00ff)" },
hyprexpo = {
columns = 3,
gap_size = 5,
bg_col = "rgb(111111)",
workspace_method = "center current",
},
},
})
hl.curve("wind", { type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } })
hl.curve("winIn", { type = "bezier", points = { { 0.1, 1 }, { 0.1, 1 } } })
hl.curve("winOut", { type = "bezier", points = { { 0.3, 0 }, { 0, 1 } } })
hl.curve("liner", { type = "bezier", points = { { 1, 1 }, { 1, 1 } } })
hl.animation({ leaf = "windows", enabled = true, speed = 6, bezier = "wind", style = "slide" })
hl.animation({ leaf = "windowsIn", enabled = true, speed = 6, bezier = "winIn", style = "popin 80%" })
hl.animation({ leaf = "windowsOut", enabled = true, speed = 5, bezier = "winOut", style = "popin 80%" })
hl.animation({ leaf = "windowsMove", enabled = true, speed = 5, bezier = "wind", style = "slide" })
hl.animation({ leaf = "border", enabled = true, speed = 1, bezier = "liner" })
hl.animation({ leaf = "borderangle", enabled = true, speed = 30, bezier = "liner", style = "loop" })
hl.animation({ leaf = "fade", enabled = true, speed = 10, bezier = "default" })
hl.animation({ leaf = "workspaces", enabled = true, speed = 5, bezier = "wind" })
hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
hl.gesture({ fingers = 3, direction = "up", action = "fullscreen" })
hl.gesture({ fingers = 3, direction = "down", action = "fullscreen", mode = "maximize" })
-- Import the completed session environment before launching long-lived helpers.
hl.on("hyprland.start", function()
local commands = {
"dbus-update-activation-environment --systemd --all",
"systemctl --user import-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE WLR_DRM_DEVICES LIBVA_DRIVER_NAME __GLX_VENDOR_LIBRARY_NAME QT_QPA_PLATFORM QT_QPA_PLATFORMTHEME GDK_BACKEND MOZ_ENABLE_WAYLAND PATH XDG_DATA_DIRS XDG_CONFIG_DIRS DBUS_SESSION_BUS_ADDRESS",
"systemctl --user start hyprpolkitagent",
"otd-daemon",
"lorri daemon",
"/etc/pam_init",
"blueman-applet",
"udev-block-notify",
"echo us > /tmp/kb_layout",
"nm-applet --indicator",
"kdeconnect-indicator",
"hyprpm reload -n",
"wl-paste --type text --watch cliphist store",
"wl-paste --type image --watch cliphist store",
"fcitx5",
"easyeffects --gapplication-service",
"voxtype daemon",
"openrgb --startminimized",
"dms run",
}
for _, command in ipairs(commands) do hl.exec_cmd(command) end
end)
-- Layer effects for DMS and the older quickshell namespaces still in use.
local blurredNamespaces = {
"^quickshell:bar$", "^quickshell:popup$", "^quickshell:notificationPopup$",
"^quickshell:overview$", "^quickshell:sidebarLeft$", "^quickshell:sidebarRight$",
}
for _, namespace in ipairs(blurredNamespaces) do
hl.layer_rule({ match = { namespace = namespace }, blur = true, ignore_alpha = 0.2 })
end
for _, namespace in ipairs({ "^quickshell:overview$", "^quickshell:sidebarLeft$", "^quickshell:sidebarRight$" }) do
hl.layer_rule({ match = { namespace = namespace }, blur_popups = true })
end
hl.layer_rule({
name = "blur-dms",
match = { namespace = "^dms:(color-picker|clipboard|spotlight|settings)$" },
blur = true,
ignore_alpha = 0,
})
for _, namespace in ipairs({ "^gtk-layer-shell$", "^lockscreen$", "^rofi$" }) do
hl.layer_rule({ match = { namespace = namespace }, blur = true })
end
local function bind(keys, dispatcher, options)
hl.bind(keys, dispatcher, options)
end
-- Launchers and applications.
bind("SUPER + ALT + R", hl.dsp.exec_cmd("pkill rofi || ~/.config/rofi/bin/launcher"), { release = true })
bind("SUPER + ALT + P", hl.dsp.exec_cmd("pkill rofi || ~/.config/rofi/bin/powermenu"))
bind("XF86AudioRecord", hl.dsp.exec_cmd("voxtype record-toggle"))
bind("SUPER + O", hl.dsp.exec_cmd("voxtype record start"))
bind("SUPER + O", hl.dsp.exec_cmd("voxtype record stop"), { release = true })
bind("SUPER + T", hl.dsp.exec_cmd("kitty"))
bind("SUPER + K", hl.dsp.exec_cmd("kitty"))
bind("SUPER + B", hl.dsp.exec_cmd("vivaldi-stable"))
bind("SUPER + CTRL + Q", hl.dsp.exit())
bind("SUPER + E", hl.dsp.exec_cmd("cosmic-files"))
bind("SUPER + SHIFT + E", hl.dsp.exec_cmd("dolphin"))
-- Window and group management.
bind("SUPER + Q", hl.dsp.window.close())
bind("SUPER + G", hl.dsp.group.toggle())
bind("SUPER + V", hl.dsp.window.float({ action = "toggle" }))
bind("SUPER + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
bind("SUPER + A", hl.dsp.workspace.swap_monitors({ monitor1 = "current", monitor2 = "+1" }))
bind("SUPER + ALT + M", hl.dsp.layout("swapwithmaster"))
-- Media keys.
bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("xbacklight -inc 10"), { locked = true, repeating = true })
bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("xbacklight -dec 10"), { locked = true, repeating = true })
bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SINK@ toggle"), { locked = true })
bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_SOURCE@ toggle"), { locked = true })
bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
-- Focus and group navigation.
for key, direction in pairs({ left = "l", right = "r", up = "u", down = "d" }) do
bind("SUPER + ALT + " .. key, hl.dsp.focus({ direction = direction }))
end
bind("SUPER + SHIFT + left", hl.dsp.group.prev())
bind("SUPER + SHIFT + right", hl.dsp.group.next())
-- Workspaces. Lua lets the repeated numeric bindings stay compact.
for i = 1, 10 do
local key = i % 10
bind("SUPER + " .. key, hl.dsp.focus({ workspace = tostring(i) }))
bind("SUPER + SHIFT + " .. key, hl.dsp.window.move({ workspace = tostring(i) }))
end
for key = 0, 9 do
local workspace = key == 0 and 19 or key + 9
bind("SUPER + ALT + " .. key, hl.dsp.focus({ workspace = tostring(workspace) }))
end
bind("SUPER + CTRL + right", hl.dsp.focus({ workspace = "+1" }))
bind("SUPER + CTRL + left", hl.dsp.focus({ workspace = "-1" }))
bind("SUPER + CTRL + SHIFT + left", hl.dsp.window.move({ workspace = "-1" }))
bind("SUPER + CTRL + SHIFT + right", hl.dsp.window.move({ workspace = "+1" }))
bind("SUPER + right", hl.dsp.window.move({ monitor = "+1" }))
bind("SUPER + left", hl.dsp.window.move({ monitor = "-1" }))
bind("ALT + Tab", hl.dsp.window.cycle_next())
bind("ALT + SHIFT + Tab", hl.dsp.window.cycle_next({ next = false }))
-- Screenshots, mouse, and application pass-through.
bind("Print", hl.dsp.exec_cmd("hyprshot --clipboard-only --mode active --mode output"))
bind("SUPER + SHIFT + S", hl.dsp.exec_cmd("hyprshot --freeze --clipboard-only --mode region"))
bind("SUPER + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
bind("SUPER + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true })
bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouse = true })
bind("CTRL + ALT + 1", hl.dsp.pass({ window = "class:^(com\\.obsproject\\.Studio)$" }))
bind("CTRL + ALT + 2", hl.dsp.pass({ window = "class:^(com\\.obsproject\\.Studio)$" }))
-- Apply GTK preferences on each config load, matching the former `exec` keywords.
hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'")
hl.exec_cmd("gsettings set org.gnome.desktop.interface font-antialiasing 'rgba'")
hl.exec_cmd("gsettings set org.gnome.desktop.interface font-hinting 'full'")
-- DMS 1.5+ owns these fragments. In particular, Display Settings rewrites outputs.lua.
require("dms.colors")
require("dms.outputs")
require("dms.layout")
require("dms.cursor")
require("dms.binds")
require("dms.binds-user")
require("dms.windowrules")

View file

@ -2,7 +2,7 @@ export def main [--abbreviate-java-class-paths (-j)] {
let input = (^lsof +c 0xFFFF -i -n -P)
let header = ($input | lines
| take 1
| each { str downcase | str replace ' name$' ' name state' })
| each { str lowercase | str replace ' name$' ' name state' })
let body = ($input | lines
| skip 1
| each { str replace '([^)])$' '$1 (NONE)' | str replace ' \((.+)\)$' ' $1' })
@ -25,4 +25,4 @@ export def 'java-cmd classpath' [] {
export def 'java-cmd abbreviate-classpath' [] {
str replace '[^ ]*\.jar' '*.jar'
}
}

7
.luarc.json Normal file
View file

@ -0,0 +1,7 @@
{
"workspace": {
"library": [
"/usr/share/hypr/stubs"
]
}
}

View file

@ -26,7 +26,7 @@ def --wrapped _omp_get_prompt [
# We have to do this because the initial value of `$env.CMD_DURATION_MS` is always `0823`, which is an official setting.
# See https://github.com/nushell/nushell/discussions/6402#discussioncomment-3466687.
if $env.CMD_DURATION_MS != '0823' {
$execution_time = $env.CMD_DURATION_MS
$execution_time = ($env.CMD_DURATION_MS | into int)
$no_status = false
}
@ -70,4 +70,4 @@ $env.PROMPT_COMMAND_RIGHT = {|| _omp_get_prompt right }
$env.TRANSIENT_PROMPT_COMMAND = {|| _omp_get_prompt transient }
# nix updates may be delayed, just depend on them instead of notices
# ^$_omp_executable notice
# ^$_omp_executable notice

File diff suppressed because it is too large Load diff

View file

@ -4,6 +4,15 @@
url = "github:getpaseo/paseo";
inputs.nixpkgs.follows = "nixpkgs";
};
bun2nix = {
url = "github:nix-community/bun2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane.url = "github:ipetkov/crane";
spacedrive-src = {
url = "github:spacedriveapp/spacedrive";
flake = false;
};
dmm = {
url = "github:deadlock-mod-manager/deadlock-mod-manager/v1.0.0";
inputs.nixpkgs.follows = "nixpkgs";
@ -84,6 +93,9 @@
hypr-kdeconnect-fix,
paseo,
reenv,
bun2nix,
crane,
spacedrive-src,
...
}@attrs:
{
@ -110,6 +122,83 @@
home-manager.useUserPackages = true;
home-manager.users.dan = import ./servers/ui-mode/home.nix;
home-manager.backupFileExtension = "backup";
nixpkgs.overlays = [
bun2nix.overlays.default
(_: prev: {
# Hyprland 0.56.1 requires glaze >= 7 and < 8, while this
# nixpkgs revision provides glaze 8.0.0.
hyprland = prev.hyprland.override {
glaze = prev.glaze.overrideAttrs (_: {
version = "7.8.3";
src = prev.fetchFromGitHub {
owner = "stephenberry";
repo = "glaze";
tag = "v7.8.3";
hash = "sha256-WqtaZ3AVDs1oIfAVQuU63eg+0753LoYfv/pRyG9OMnM=";
};
});
};
# ethnum 1.5.2 assumes TryFromIntError is zero-sized, which is
# no longer true with Rust 1.97. Apply its upstream safe fix to
# SpacetimeDB's writable Cargo vendor tree.
spacetimedb = prev.spacetimedb.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
substituteInPlace "$cargoDepsCopy/source-registry-0/ethnum-1.5.2/src/error.rs" \
--replace-fail 'pub const fn tfie() -> TryFromIntError {' 'pub fn tfie() -> TryFromIntError {' \
--replace-fail 'unsafe { mem::transmute(()) }' 'u8::try_from(-1i8).unwrap_err()'
'';
});
# pyfilesystem2 still uses pkg_resources at runtime, which was
# removed from setuptools 82. Keep setuptools 80 build-only for
# the upstream tests, but migrate the installed package to the
# standard-library entry-point API so Python environments don't
# contain two conflicting setuptools versions.
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(_: pythonPrev: {
fs = pythonPrev.fs.overridePythonAttrs (old: {
nativeCheckInputs = (old.nativeCheckInputs or [ ]) ++ [
pythonPrev.setuptools_80
];
postInstall = (old.postInstall or "") + ''
fsPath="$out/${pythonPrev.python.sitePackages}/fs"
substituteInPlace "$fsPath/__init__.py" "$fsPath/opener/__init__.py" \
--replace-fail '__import__("pkg_resources").declare_namespace(__name__) # type: ignore' ""
substituteInPlace "$fsPath/opener/registry.py" \
--replace-fail 'import pkg_resources' 'from importlib import metadata' \
--replace-fail 'pkg_resources.iter_entry_points("fs.opener")' 'metadata.entry_points(group="fs.opener")' \
--replace-fail 'pkg_resources.iter_entry_points("fs.opener", protocol)' 'iter(metadata.entry_points(group="fs.opener", name=protocol))'
'';
meta = old.meta // {
broken = false;
};
});
})
];
})
(final: _: {
spacedrive-master =
let
sources = import ./pkgs/spacedrive/nix/sources.nix {
inherit (final) lib;
root = spacedrive-src;
};
packages = import ./pkgs/spacedrive/nix {
pkgs = final;
craneLib = crane.mkLib final;
upstreamRoot = spacedrive-src;
inherit (sources)
frontendSrc
daemonRustSrc
desktopRustSrc
cliRustSrc
;
};
in
packages.spacedrive;
})
];
networking.hostName = "fern";
imports = [ ./servers/fern/hardware-configuration.nix ];
}

4932
pkgs/spacedrive/bun.lock Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,35 @@
diff --git a/apps/tauri/src-tauri/src/main.rs b/apps/tauri/src-tauri/src/main.rs
index 7c2a17f..0d22a25 100644
--- a/apps/tauri/src-tauri/src/main.rs
+++ b/apps/tauri/src-tauri/src/main.rs
@@ -17,6 +17,6 @@ use tauri::menu::MenuItem;
use tauri::Emitter;
use tauri::{AppHandle, Manager};
-use tauri_plugin_global_shortcut::ShortcutState;
+use tauri_plugin_global_shortcut::{GlobalShortcutExt, ShortcutState};
use tokio::sync::oneshot;
use tokio::sync::RwLock;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
@@ -1928,8 +1928,6 @@ fn main() {
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(
tauri_plugin_global_shortcut::Builder::new()
- .with_shortcut("Alt+Space")
- .expect("failed to register Alt+Space global shortcut")
.with_handler(|app, _shortcut, event| {
if event.state() == ShortcutState::Pressed {
if let Err(error) = windows::toggle_voice_overlay_internal(app.clone()) {
@@ -1987,6 +1985,13 @@ fn main() {
keybinds::get_registered_keybinds
])
.setup(|app| {
+ if let Err(error) = app.global_shortcut().register("Alt+Space") {
+ tracing::warn!(
+ ?error,
+ "Alt+Space is already registered; voice overlay shortcut is disabled"
+ );
+ }
+
// Setup native menu
if let Err(e) = setup_menu(app.handle()) {
tracing::warn!("Failed to setup menu: {}", e);

8249
pkgs/spacedrive/nix/bun.nix Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,341 @@
{
pkgs,
craneLib,
upstreamRoot,
frontendSrc,
daemonRustSrc,
desktopRustSrc,
cliRustSrc,
}:
let
inherit (pkgs) lib stdenv;
targetTriple = stdenv.hostPlatform.config;
pdfiumVersion = "6666";
archiveToolPackages = with pkgs; [
unzip
gnutar
gzip
bzip2
xz
p7zip
];
daemonRuntimePath = lib.makeBinPath ([ pkgs.ffmpeg_7.bin ] ++ archiveToolPackages);
gstreamerPackages = with pkgs.gst_all_1; [
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
gst-libav
];
gstreamerPluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gstreamerPackages;
tauriCargoToml = builtins.fromTOML (
builtins.readFile "${upstreamRoot}/apps/tauri/src-tauri/Cargo.toml"
);
version = tauriCargoToml.package.version;
pdfiumUrl =
if stdenv.hostPlatform.isx86_64 then
"https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${pdfiumVersion}/pdfium-linux-x64.tgz"
else if stdenv.hostPlatform.isAarch64 then
"https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F${pdfiumVersion}/pdfium-linux-arm64.tgz"
else
throw "Unsupported platform for pdfium: ${stdenv.hostPlatform.system}";
pdfiumHash =
if stdenv.hostPlatform.isx86_64 then
"sha256-stUhbZ1ZfqxqpV1eFTEMd+F0xXVP2YE3sqPh6J7yd7I="
else if stdenv.hostPlatform.isAarch64 then
"sha256-cydMLWhrN5C6WxUw6HLpl/51S05QBG/+SudvO/6MNZM="
else
throw "Unsupported platform for pdfium: ${stdenv.hostPlatform.system}";
pdfium = stdenv.mkDerivation {
pname = "pdfium";
version = pdfiumVersion;
src = pkgs.fetchurl {
url = pdfiumUrl;
hash = pdfiumHash;
};
sourceRoot = ".";
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/lib $out/include
cp lib/libpdfium.so $out/lib/
cp -r include/. $out/include/
runHook postInstall
'';
};
bunNix = pkgs.runCommandLocal "spacedrive-bun.nix" { } ''
substitute ${./bun.nix} $out --replace-fail __ROOT__ ${frontendSrc}
'';
frontend = stdenv.mkDerivation {
pname = "spacedrive-frontend";
inherit version;
src = frontendSrc;
nativeBuildInputs = [ pkgs.bun2nix.hook ];
bunDeps = pkgs.bun2nix.fetchBunDeps {
bunNix = bunNix;
};
dontRunLifecycleScripts = true;
dontConfigure = true;
postPatch = ''
cp ${../bun.lock} bun.lock
'';
buildPhase = ''
runHook preBuild
bun run --filter @sd/tauri build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r apps/tauri/dist/. $out/
runHook postInstall
'';
};
commonNativeBuildInputs = with pkgs; [
cmake
pkg-config
protobuf
];
commonBuildInputs = with pkgs; [
openssl
];
daemonBuildInputs = commonBuildInputs ++ [
pkgs.ffmpeg_7
];
daemonNativeBuildInputs = commonNativeBuildInputs ++ [
pkgs.clang
pkgs.llvmPackages.libclang
];
desktopBuildInputs = commonBuildInputs ++ [
pkgs.dbus
pkgs.glib
pkgs.glib-networking
pkgs.gst_all_1.gstreamer
pkgs.gst_all_1.gst-libav
pkgs.gst_all_1.gst-plugins-bad
pkgs.gst_all_1.gst-plugins-base
pkgs.gst_all_1.gst-plugins-good
pkgs.gst_all_1.gst-plugins-ugly
pkgs.gtk3
pkgs.libayatana-appindicator
pkgs.libsoup_3
pkgs.webkitgtk_4_1
];
commonArgs = {
inherit version;
strictDeps = true;
doCheck = false;
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "256";
CARGO_PROFILE_RELEASE_LTO = "off";
nativeBuildInputs = commonNativeBuildInputs;
buildInputs = commonBuildInputs;
};
rust197PostPatch = ''
substituteInPlace crates/task-system/src/system.rs \
--replace-fail '.fetch_update(' '.try_update('
'';
daemonCargoArtifacts = craneLib.buildDepsOnly (
commonArgs
// {
pname = "spacedrive-cargo-artifacts";
src = daemonRustSrc;
cargoExtraArgs = "--package sd-core --bin sd-daemon --features ffmpeg";
buildInputs = daemonBuildInputs;
nativeBuildInputs = daemonNativeBuildInputs;
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.ffmpeg_7.dev}/include";
FFMPEG_DIR = "${pkgs.ffmpeg_7.dev}";
}
);
cliCargoArtifacts = craneLib.buildDepsOnly (
commonArgs
// {
pname = "sd-cli-cargo-artifacts";
src = cliRustSrc;
cargoExtraArgs = "--package sd-cli --bin sd-cli";
}
);
desktopCargoArtifacts = craneLib.buildDepsOnly (
commonArgs
// {
pname = "spacedrive-desktop-cargo-artifacts";
src = desktopRustSrc;
cargoExtraArgs = "--package spacedrive --bin Spacedrive";
buildInputs = desktopBuildInputs;
}
);
sd-daemon = craneLib.buildPackage (
commonArgs
// {
pname = "sd-daemon";
src = daemonRustSrc;
cargoArtifacts = daemonCargoArtifacts;
cargoExtraArgs = "--package sd-core --bin sd-daemon --features ffmpeg";
postPatch = rust197PostPatch;
buildInputs = daemonBuildInputs;
nativeBuildInputs = daemonNativeBuildInputs ++ [ pkgs.makeWrapper ];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.ffmpeg_7.dev}/include";
FFMPEG_DIR = "${pkgs.ffmpeg_7.dev}";
postFixup = ''
wrapProgram $out/bin/sd-daemon \
--prefix PATH : ${daemonRuntimePath} \
--set PDFIUM_LIB_PATH ${pdfium}/lib/libpdfium.so
'';
}
);
sd-cli = craneLib.buildPackage (
commonArgs
// {
pname = "sd-cli";
src = cliRustSrc;
cargoArtifacts = cliCargoArtifacts;
cargoExtraArgs = "--package sd-cli --bin sd-cli";
postPatch = rust197PostPatch;
}
);
desktopItem = pkgs.makeDesktopItem {
name = "spacedrive";
desktopName = "Spacedrive";
exec = "spacedrive";
icon = "spacedrive";
categories = [
"FileManager"
"Utility"
];
terminal = false;
};
spacedrive-desktop = craneLib.buildPackage (
commonArgs
// {
pname = "spacedrive-desktop";
src = desktopRustSrc;
cargoArtifacts = desktopCargoArtifacts;
cargoExtraArgs = "--package spacedrive --bin Spacedrive";
patches = [ ../graceful-global-shortcut.patch ];
postPatch = rust197PostPatch;
nativeBuildInputs = commonNativeBuildInputs ++ [
pkgs.wrapGAppsHook4
];
buildInputs = desktopBuildInputs;
preBuild = ''
mkdir -p apps/tauri/dist
cp -r ${frontend}/. apps/tauri/dist/
mkdir -p target/release
cp ${sd-daemon}/bin/sd-daemon target/release/sd-daemon
cp ${sd-daemon}/bin/sd-daemon target/release/sd-daemon-${targetTriple}
chmod +x target/release/sd-daemon target/release/sd-daemon-${targetTriple}
'';
postInstall = ''
mkdir -p $out/share/icons/hicolor/128x128/apps
cp apps/tauri/src-tauri/icons/128x128.png $out/share/icons/hicolor/128x128/apps/spacedrive.png
'';
postFixup = ''
wrapProgram $out/bin/Spacedrive \
--set GST_PLUGIN_SYSTEM_PATH_1_0 ${gstreamerPluginPath} \
--set SPACEDRIVE_DAEMON_PATH ${sd-daemon}/bin/sd-daemon
'';
meta = with lib; {
description = "Spacedrive desktop application";
homepage = "https://github.com/spacedriveapp/spacedrive";
license = licenses.agpl3Only;
mainProgram = "Spacedrive";
platforms = platforms.linux;
};
}
);
spacedrive = pkgs.symlinkJoin {
name = "spacedrive";
paths = [
spacedrive-desktop
sd-daemon
desktopItem
];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
ln -s Spacedrive $out/bin/spacedrive
'';
meta = spacedrive-desktop.meta // {
mainProgram = "spacedrive";
};
};
ui-test = pkgs.rustPlatform.buildRustPackage {
pname = "ui-test";
version = "0.1.0";
src = ../tools/ui-test;
cargoLock.lockFile = ../tools/ui-test/Cargo.lock;
meta = with lib; {
description = "Spacedrive UI test scaffold and scenario runner";
homepage = "https://github.com/spacedriveapp/spacedrive";
license = licenses.agpl3Only;
mainProgram = "ui-test";
platforms = platforms.linux;
};
};
test-ui-full = pkgs.writeShellApplication {
name = "test-ui-full";
runtimeInputs = with pkgs; [
chromium
chromedriver
curl
jq
python3
python3Packages.selenium
];
text = ''
export TEST_UI_FULL_PY=${../tools/ui-test/test_ui_full.py}
export CHROME_BIN=${pkgs.chromium}/bin/chromium
export CHROMEDRIVER_BIN=${pkgs.chromedriver}/bin/chromedriver
exec ${pkgs.bash}/bin/bash ${../tools/ui-test/test-ui-full.sh} "$@"
'';
};
in
{
inherit
frontend
sd-cli
sd-daemon
spacedrive-desktop
spacedrive
;
}

View file

@ -0,0 +1,64 @@
{ lib, root }:
let
cleaned = lib.cleanSource root;
commonCargoFiles = [
"^\\.cargo(/.*)?$"
"^Cargo\\.lock$"
"^Cargo\\.toml$"
"^rust-toolchain\\.toml$"
"^apps$"
"^apps/mobile$"
"^apps/mobile/modules$"
"^apps/mobile/modules/sd-mobile-core$"
"^apps/mobile/modules/sd-mobile-core/core$"
"^apps/mobile/modules/sd-mobile-core/core/Cargo\\.toml$"
"^apps/mobile/modules/sd-mobile-core/core/src(/.*)?$"
];
in
{
frontendSrc = lib.sources.sourceByRegex cleaned [
"^package\\.json$"
"^tsconfig\\.json$"
"^bunfig\\.toml$"
"^apps(/.*)?$"
"^packages(/.*)?$"
"^scripts(/.*)?$"
"^\\.github/actions(/.*)?$"
];
daemonRustSrc = lib.sources.sourceByRegex cleaned (
commonCargoFiles
++ [
"^apps/cli(/.*)?$"
"^apps/server(/.*)?$"
"^apps/tauri(/.*)?$"
"^core(/.*)?$"
"^crates(/.*)?$"
"^xtask(/.*)?$"
]
);
desktopRustSrc = lib.sources.sourceByRegex cleaned (
commonCargoFiles
++ [
"^apps/cli(/.*)?$"
"^apps/server(/.*)?$"
"^apps/tauri(/.*)?$"
"^core(/.*)?$"
"^crates(/.*)?$"
"^xtask(/.*)?$"
]
);
cliRustSrc = lib.sources.sourceByRegex cleaned (
commonCargoFiles
++ [
"^apps/cli(/.*)?$"
"^apps/server(/.*)?$"
"^apps/tauri(/.*)?$"
"^core(/.*)?$"
"^crates(/.*)?$"
"^xtask(/.*)?$"
]
);
}

View file

@ -23,6 +23,8 @@ let
# ntfy = 3003;
forgejo = 8300;
snaps = 8400;
matrix = 6167;
livekit = 7880;
};
internalPorts = {
prometheus-node = 9000;
@ -32,7 +34,10 @@ let
prometheus-prowlarr = 9103;
prometheus-llama-swap = 9409;
prometheus = 9090;
livekit-jwt = 8080;
};
matrixServerName = "matrix.badapple.cz";
livekitKeyFile = "/etc/secrets/livekit.keys";
in
{
deployment = {
@ -88,6 +93,36 @@ in
enable = true;
};
matrix-tuwunel = {
enable = true;
settings.global = {
server_name = matrixServerName;
port = [ ports.matrix ];
allow_registration = false;
};
};
livekit = {
enable = true;
keyFile = livekitKeyFile;
openFirewall = true;
settings = {
port = ports.livekit;
room.auto_create = false;
rtc = {
tcp_port = 7881;
use_external_ip = true;
};
};
};
lk-jwt-service = {
enable = true;
keyFile = livekitKeyFile;
livekitUrl = "wss://${matrixServerName}/livekit/sfu";
port = internalPorts.livekit-jwt;
};
sonarr = {
enable = true;
settings.server.port = ports.sonarr;
@ -300,6 +335,38 @@ in
}) (builtins.attrNames ports)
)
// {
"${matrixServerName}" = {
extraConfig = ''
@matrixClientWellKnown path /.well-known/matrix/client
handle @matrixClientWellKnown {
header Access-Control-Allow-Origin "*"
header Content-Type application/json
respond `{\"m.homeserver\":{\"base_url\":\"https://${matrixServerName}\"},\"org.matrix.msc4143.rtc_foci\":[{\"type\":\"livekit\",\"livekit_service_url\":\"https://${matrixServerName}/livekit/jwt\"}]}` 200
}
@matrixServerWellKnown path /.well-known/matrix/server
handle @matrixServerWellKnown {
header Access-Control-Allow-Origin "*"
header Content-Type application/json
respond `{\"m.server\":\"${matrixServerName}:443\"}` 200
}
@jwtService path /livekit/jwt/sfu/get /livekit/jwt/healthz
handle @jwtService {
uri strip_prefix /livekit/jwt
reverse_proxy http://localhost:${toString internalPorts.livekit-jwt}
}
@livekit path /livekit/sfu*
handle @livekit {
reverse_proxy http://localhost:${toString ports.livekit}
}
handle {
reverse_proxy http://localhost:${toString ports.matrix}
}
'';
};
"translations.danbulant.cloud:80, translations.rpi1.danbulant.cloud:80" = {
extraConfig = ''
reverse_proxy http://localhost:${toString ports.tolgee}
@ -319,6 +386,10 @@ in
group = "caddy";
};
};
systemd.services.lk-jwt-service.environment.LIVEKIT_FULL_ACCESS_HOMESERVERS = matrixServerName;
# LiveKit's TCP ICE fallback is separate from its HTTP/WebSocket port.
networking.firewall.allowedTCPPorts = [ 7881 ];
# systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
virtualisation = {

View file

@ -18,6 +18,11 @@
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/media/large" =
{ device = "/dev/disk/by-uuid/30f7482a-34d9-408b-8ccc-318788ff6b8d";
fsType = "btrfs";
# options = [ "subvol=@" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3CC7-A154";

View file

@ -197,7 +197,7 @@
"https://nix-gaming.cachix.org"
"https://colmena.cachix.org"
"https://install.determinate.systems"
"https://cache.garnix.io"
# "https://cache.garnix.io"
"https://rusic.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://cache.nixos-cuda.org"
@ -208,7 +208,7 @@
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
# "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"rusic.cachix.org-1:WXMpGpamblLUiJtcoxBxGGGGwIcWxGPJBUxarLiqWmw="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
@ -450,8 +450,11 @@
allowUnfree = true;
cudaSupport = true;
android_sdk.accept_license = true;
problems.handlers.fs.broken = "warn";
};
documentation.man.enable = false;
hardware.graphics = {
enable = true;
# Steam support
@ -460,7 +463,7 @@
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
services.cpupower-gui.enable = true;
#services.cpupower-gui.enable = true;
services.upower.enable = true;
services.power-profiles-daemon.enable = false;
services.tlp = {

View file

@ -52,6 +52,17 @@ let
});
deadlockModManager = dmm.packages.${pkgs.system}.nightly.overrideAttrs (oldAttrs: {
pnpmDeps = pkgs.fetchPnpmDeps {
inherit (oldAttrs)
pname
version
src
;
pnpm = pkgs.pnpm_11;
fetcherVersion = 4;
sourceRoot = "source";
hash = "sha256-ZxlP6zOwY9Fxa4BCqnUoCmci3lviHn7H3HU5SnmdrSU=";
};
postPatch = (oldAttrs.postPatch or "") + ''
substituteInPlace apps/desktop/src-tauri/Cargo.toml \
--replace 'tauri-wry = ["tauri/wry"]' 'tauri-wry = ["tauri/wry"]
@ -121,6 +132,8 @@ in
stateVersion = "25.11";
packages = with pkgs; [
spacedrive-master
eden
gh
inkscape
osuLazerBinNvidia
@ -280,7 +293,7 @@ in
swaybg
activitywatchFixed
networkmanagerapplet
kubectl
#kubectl
duf
dust
#jetbrains.webstorm
@ -434,14 +447,8 @@ in
};
gtk = {
enable = true;
theme = {
package = pkgs.orchis-theme;
name = "Orchis";
};
gtk4.theme = config.gtk.theme;
};
programs.man.enable = false;
services.lorri.enable = true;
wayland.windowManager.hyprland = {
# enable = true;

View file

@ -1 +1 @@
nixos-rebuild boot --option extra-substituters "https://cache.nixos.org https://nix-community.cachix.org https://hyprland.cachix.org https://nix-gaming.cachix.org https://colmena.cachix.org https://install.determinate.systems https://cache.garnix.io https://rusic.cachix.org" --option extra-trusted-public-keys "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc= nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= rusic.cachix.org-1:WXMpGpamblLUiJtcoxBxGGGGwIcWxGPJBUxarLiqWmw=" --flake ".#fern"
nixos-rebuild boot --option extra-substituters "https://cache.nixos.org https://nix-community.cachix.org https://hyprland.cachix.org https://nix-gaming.cachix.org https://colmena.cachix.org https://install.determinate.systems https://cache.garnix.io https://rusic.cachix.org" --option extra-trusted-public-keys "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc= nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= rusic.cachix.org-1:WXMpGpamblLUiJtcoxBxGGGGwIcWxGPJBUxarLiqWmw=" --flake ".#fern"