if ($nu.os-info.name != linux) { return } const services = [ [profile-sync-daemon psd psd.service] [pueued pueued pueued.service] [hypridle hypridle hypridle.service] [hyprsunset hyprsunset hyprsunset.service] [hyprpolkitagent /usr/lib/hyprpolkitagent/hyprpolkitagent hyprpolkitagent.service] [mako mako mako.service] [cliphist cliphist cliphist.service] [wl-clip-persist wl-clip-persist wl-clip-persist.service] [wezterm-mux-server wezterm-mux-server wezterm-mux-server.service] [ironbar ironbar ironbar.service] [ironbar-workspaces python ironbar-workspaces.service] [quickshell qs quickshell.service] ] $services | each { | service | let name = $service.0 let binary = $service.1 let service_name = $service.2 let found = if ($binary | str starts-with "/") { $binary | path exists } else { which $binary | is-not-empty } if $found { print $"Found program ($name). Enabling service now." systemctl --user enable --now $service_name null } } null