users.chn.plasma.autostart: init

This commit is contained in:
2024-02-12 10:17:28 +08:00
parent 6a36fe0539
commit 02981d242f
6 changed files with 77 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
inputs:
{
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
{
home-manager.users.chn.config.home.file =
let
devices =
{
pc = [ "nheko" "kclockd" "yakuake" "telegram" ];
surface = [ "kclockd" "yakuake" "telegram" ];
};
in builtins.listToAttrs (builtins.map
(file: { name = ".config/autostart/${file}.desktop"; value.source = ./. + "/${file}.desktop"; })
(devices.${inputs.config.nixos.system.networking.hostname}));
environment.persistence =
let impermanence = inputs.config.nixos.system.impermanence;
in inputs.lib.mkIf impermanence.enable
{
"${impermanence.root}".users.chn.directories = [ ".config/autostart" ];
};
};
}

View File

@@ -0,0 +1,6 @@
[Desktop Entry]
DBusActivatable=true
Exec=kclockd
Name=org.kde.kclockd-autostart
Type=Application
X-Flatpak=org.kde.kclockd-autostart

View File

@@ -0,0 +1,15 @@
[Desktop Entry]
Categories=Network;InstantMessaging;Qt;
Comment=Desktop client for Matrix
Exec=nheko %u
Icon=nheko
Keywords=Matrix;matrix.org;chat;irc;communications;talk;riot;element;fractal;voip;
MimeType=x-scheme-handler/matrix;
Name=nheko
StartupWMClass=nheko
Terminal=false
Type=Application
Version=1.0
X-GNOME-UsesNotifications=true
X-KDE-Keywords=Matrix,matrix.org,chat,irc,communications,talk,riot,element,fractal,voip,
X-Purism-FormFactor=Workstation;Mobile;

View File

@@ -0,0 +1,17 @@
[Desktop Entry]
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=telegram-desktop
Exec=telegram-desktop -autostart
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
Actions=quit;
DBusActivatable=true
SingleMainWindow=true
X-GNOME-UsesNotifications=true
X-GNOME-SingleWindow=true

View File

@@ -0,0 +1,16 @@
[Desktop Entry]
Categories=Qt;KDE;System;TerminalEmulator;
Comment[zh_CN]=一个基于KDE Konsole 技术的下拉式终端仿真器。
Comment=A drop-down terminal emulator based on KDE Konsole technology.
DBusActivatable=true
Exec=yakuake
GenericName[zh_CN]=下拉式终端
GenericName=Drop-down Terminal
Icon=yakuake
Name[zh_CN]=Yakuake
Name=Yakuake
Terminal=false
Type=Application
X-DBUS-ServiceName=org.kde.yakuake
X-DBUS-StartupType=Unique
X-KDE-StartupNotify=false

View File

@@ -1,6 +1,6 @@
inputs:
{
imports = inputs.localLib.mkModules [ ./wallpaper ./konsole.nix ./shortcuts.nix ./theme.nix ];
imports = inputs.localLib.mkModules [ ./autostart ./wallpaper ./konsole.nix ./shortcuts.nix ./theme.nix ];
config = inputs.lib.mkIf inputs.config.nixos.system.gui.enable
{
home-manager.users.chn.config.programs.plasma = inputs.lib.mkMerge