move telegram package and service to a file

This commit is contained in:
Andreas Zweili 2021-12-22 17:18:20 +01:00
parent fe425ae0de
commit 3dfcfb9dd7
3 changed files with 12 additions and 8 deletions

View File

@ -11,7 +11,6 @@
./restic
./droidcam
../home-manager/desktop/services/keeweb.nix
../home-manager/desktop/services/telegram-desktop.nix
];
networking = {

View File

@ -7,11 +7,11 @@
./work-desktop.nix
./software/pycharm
./software/signal
./software/telegram
];
home.packages = with pkgs; [
appimage-run
keeweb
unstable.tdesktop
unstable.vscode
unstable.youtube-dl
];

View File

@ -1,11 +1,16 @@
# needs to be imported into the main nix config
{ config, pkgs, ... }:
{ pkgs, ... }:
{
home.packages = with pkgs; [
unstable.tdesktop
];
systemd.user.services.telegram-desktop = {
description = "Telegram Desktop";
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
Unit = {
description = "Telegram Desktop";
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.unstable.tdesktop}/bin/telegram-desktop";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";