diff --git a/user/chat.nix b/user/chat.nix new file mode 100644 index 0000000..65c8e1d --- /dev/null +++ b/user/chat.nix @@ -0,0 +1,43 @@ +{ config, pkgs, lib, inputs, ... }: +let inherit (import ./variables.nix) key theme color accent font; +in { + + systemd.user.services = { + discord = { + Unit = { + Description = "Discord Internet voice chat"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "/usr/bin/env flatpak run io.github.spacingbat3.webcord"; + Restart = "on-failure"; + }; + Install = { WantedBy = [ "sway-session.target" ]; }; + }; + telegram = { + Unit = { + Description = "Telegram Internet chat"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.tdesktop}/bin/telegram-desktop"; + Restart = "on-failure"; + }; + Install = { WantedBy = [ "sway-session.target" ]; }; + }; + }; + + home.packages = with pkgs; [ + tdesktop + ]; + + home.activation = { + install_flatpaks = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + $DRY_RUN_CMD flatpak $VERBOSE_ARG remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || true + $DRY_RUN_CMD flatpak $VERBOSE_ARG install -y flathub io.github.spacingbat3.webcord || true + ''; + }; + +} diff --git a/user/home.nix b/user/home.nix index b689aad..1bdd2c6 100644 --- a/user/home.nix +++ b/user/home.nix @@ -19,6 +19,7 @@ in { ./mangohud.nix ./rnnoise.nix ./mimeapps.nix + ./chat.nix inputs.hyprland.homeManagerModules.default ]; # Home Manager needs a bit of information about you and the @@ -62,7 +63,6 @@ in { # steam # It's enabled in the system config ## chat - tdesktop thunderbird # discord # I'm using webcord, see home.activation @@ -141,12 +141,7 @@ in { in "${preview_opts} ${color_opts}"; }; programs.bash = { enable = true; }; - home.activation = { - install_flatpaks = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - $DRY_RUN_CMD flatpak $VERBOSE_ARG remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || true - $DRY_RUN_CMD flatpak $VERBOSE_ARG install -y flathub io.github.spacingbat3.webcord || true - ''; - }; + services.kdeconnect = { enable = true; indicator = true; @@ -192,32 +187,6 @@ in { enable = true; tray.enable = true; }; - systemd.user.services = { - discord = { - Unit = { - Description = "Discord Internet voice chat"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = "/usr/bin/env flatpak run io.github.spacingbat3.webcord"; - Restart = "on-failure"; - }; - Install = { WantedBy = [ "sway-session.target" ]; }; - }; - telegram = { - Unit = { - Description = "Telegram Internet chat"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = "${pkgs.tdesktop}/bin/telegram-desktop"; - Restart = "on-failure"; - }; - Install = { WantedBy = [ "sway-session.target" ]; }; - }; - }; # My bemenu wrapper xdg.configFile = { "bmenu.conf".text = ''