refactor: auto start apps on login via xdg-autostart (#242)

Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
This commit is contained in:
Ryan Yin
2026-01-04 01:03:14 +08:00
committed by GitHub
parent e3fb563b79
commit e83b7a867f
6 changed files with 134 additions and 127 deletions

View File

@@ -0,0 +1,23 @@
{ pkgs, lib, ... }:
{
# XDG autostart entries - ensures apps start after portal services are ready
xdg.autostart.enable = true;
# This fixes nixpak sandboxed apps (like firefox) accessing mapped folders correctly
xdg.autostart.entries = [
"${pkgs.foot}/share/applications/foot.desktop"
"${pkgs.alacritty}/share/applications/Alacritty.desktop"
"${pkgs.ghostty}/share/applications/com.mitchellh.ghostty.desktop"
"${pkgs.clash-verge-rev}/share/applications/clash-verge.desktop"
# nixpaks
"${pkgs.nixpaks.firefox}/share/applications/org.mozilla.firefox.desktop"
"${pkgs.nixpaks.telegram-desktop}/share/applications/org.telegram.desktop.desktop"
]
++ (
if pkgs.stdenv.isx86_64 then
[ "${pkgs.google-chrome}/share/applications/google-chrome.desktop" ]
else
[ "${pkgs.chromium}/share/applications/chromium-browser.desktop" ]
);
}