diff --git a/modules/nixos/workflows/mosey-branch/config/desktop-session/core-service.desktop.in b/modules/nixos/workflows/mosey-branch/config/desktop-session/core-service.desktop.in new file mode 100644 index 00000000..af0b3dac --- /dev/null +++ b/modules/nixos/workflows/mosey-branch/config/desktop-session/core-service.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=@component@ +Comment=@description@ +Exec=@script@ +OnlyShowIn=Mosey Branch; +NoDisplay=true +X-GNOME-Autostart-Phase=@gsm_phase@ +X-GNOME-Autostart-Notify=true +X-GNOME-AutoRestart=true +X-GNOME-HiddenUnderSystemd=true diff --git a/modules/nixos/workflows/mosey-branch/config/desktop-session/meson.build b/modules/nixos/workflows/mosey-branch/config/desktop-session/meson.build index b6c2f8e9..3a398757 100644 --- a/modules/nixos/workflows/mosey-branch/config/desktop-session/meson.build +++ b/modules/nixos/workflows/mosey-branch/config/desktop-session/meson.build @@ -8,7 +8,9 @@ app_id = 'one.foodogsquared.MoseyBranch' prefix = get_option('prefix') datadir = join_paths(prefix, get_option('datadir')) systemddir = join_paths(prefix, 'share/systemd') +applicationsdir = join_paths(datadir, 'applications') systemduserdir = join_paths(systemddir, 'user') +autostartdir = join_paths(prefix, 'etc/xdg/autostart') unit_name_template = app_id + '.@0@.@1@' required_components = { @@ -80,6 +82,14 @@ configure_file( install: true, ) +configure_file( + input: 'mosey-branch.desktop.in', + output: app_id + '.desktop', + install_dir: applicationsdir, + configuration: serviceconf, + install: true, +) + # Setting up for installing with the core services systemd units. required_services = [] foreach name, component : required_components @@ -105,6 +115,7 @@ foreach name, component : required_components componentsconf.set('app_id', app_id) componentsconf.set('description', component.get('description')) componentsconf.set('script', component.get('script')) + componentsconf.set('gsm_phase', component.get('gsm_phase', 'Desktop')) configure_file( input: 'core-service.service.in', @@ -121,4 +132,12 @@ foreach name, component : required_components configuration: componentsconf, install: true, ) + + configure_file( + input: 'core-service.desktop.in', + output: unit_name_template.format(name, 'desktop'), + install_dir: autostartdir, + configuration: componentsconf, + install: true, + ) endforeach diff --git a/modules/nixos/workflows/mosey-branch/config/desktop-session/mosey-branch.desktop.in b/modules/nixos/workflows/mosey-branch/config/desktop-session/mosey-branch.desktop.in new file mode 100644 index 00000000..856df2b0 --- /dev/null +++ b/modules/nixos/workflows/mosey-branch/config/desktop-session/mosey-branch.desktop.in @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Application +Name=Mosey Branch +Comment=Window manager +Exec=@script@ +Categories=wlroots;Core; +OnlyShowIn=Mosey Branch; +NoDisplay=true +X-GNOME-Autostart-Phase=DisplayServer +X-GNOME-Provides=windowmanager; +X-GNOME-Autostart-Notify=true +X-GNOME-AutoRestart=false +X-GNOME-HiddenUnderSystemd=true