mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 09:58:25 +02:00
refactor: auto start apps on login via xdg-autostart (#242)
Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
This commit is contained in:
23
home/linux/gui/base/xdg/autostart.nix
Normal file
23
home/linux/gui/base/xdg/autostart.nix
Normal 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" ]
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user