chat: autostart programs using sway settings
This commit is contained in:
parent
77cb5087ac
commit
2649edfb47
|
@ -1,71 +1,11 @@
|
||||||
{ config, pkgs, lib, inputs, ... }: {
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
systemd.user.services = {
|
wayland.windowManager.sway = {
|
||||||
astroid = lib.mkIf (pkgs.uservars.email-client == "astroid") {
|
extraConfig = ''
|
||||||
Unit = {
|
exec thunderbird
|
||||||
Description = "Astroid Email client";
|
exec webcord
|
||||||
PartOf = [ "graphical-session.target" ];
|
exec telegram-desktop
|
||||||
After = [ "graphical-session.target" ];
|
exec element-desktop
|
||||||
};
|
'';
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 10s";
|
|
||||||
ExecStart = "${pkgs.astroid}/bin/astroid";
|
|
||||||
Restart = "on-failure";
|
|
||||||
TimeoutStopSec = 10;
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
thunderbird = lib.mkIf (pkgs.uservars.email-client == "thunderbird") {
|
|
||||||
Unit = {
|
|
||||||
Description = "Thunderbird Email client";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 10s";
|
|
||||||
ExecStart = "${pkgs.thunderbird}/bin/thunderbird";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
discord = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Discord Internet voice chat";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" "pipewire-pulse.service" "tray.service" "telegram.service" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 12s";
|
|
||||||
ExecStart = "${pkgs.webcord}/bin/webcord";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
telegram = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Telegram Internet chat";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" "pipewire-pulse.service" "tray.service" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 11s";
|
|
||||||
ExecStart = "${pkgs.tdesktop}/bin/telegram-desktop";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
element = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Feature-rich client for Matrix.org";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" "pipewire-pulse.service" "tray.service" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 11s";
|
|
||||||
ExecStart = "${pkgs.element-desktop-wayland}/bin/element-desktop";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
@ -49,20 +49,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.services = lib.mkIf (browser == "firefox") {
|
wayland.windowManager.sway = {
|
||||||
firefox = {
|
extraConfig = ''
|
||||||
Unit = {
|
exec firefox
|
||||||
Description = "Firefox Web client";
|
'';
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 10s";
|
|
||||||
ExecStart = "${pkgs.firefox}/bin/firefox";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
|
|
@ -12,11 +12,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
LD_PRELOAD = "";
|
|
||||||
GTK_CSD = "1";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
inputs.nixos-conf-editor.packages.${pkgs.system}.nixos-conf-editor
|
inputs.nixos-conf-editor.packages.${pkgs.system}.nixos-conf-editor
|
||||||
inputs.nix-software-center.packages.${pkgs.system}.nix-software-center
|
inputs.nix-software-center.packages.${pkgs.system}.nix-software-center
|
||||||
|
|
Loading…
Reference in a new issue