diff --git a/modules/home/applications/telegram.nix b/modules/home/applications/telegram.nix new file mode 100644 index 0000000..0d7186e --- /dev/null +++ b/modules/home/applications/telegram.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + pkgs, + ... +}: +let + inherit (lib) getExe mkEnableOption mkIf; + cfg = config.ataraxia.programs.telegram; +in +{ + options.ataraxia.programs.telegram = { + enable = mkEnableOption "Enable telegram program"; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + telegram-desktop + ]; + + defaultApplications.messenger = { + cmd = getExe pkgs.telegram-desktop; + desktop = "telegram-desktop"; + }; + + startupApplications = with config.defaultApplications; [ + messenger.cmd + ]; + + persist.state.directories = [ + ".local/share/TelegramDesktop" + ]; + }; +} diff --git a/modules/home/roles/default.nix b/modules/home/roles/default.nix index 7aafd37..86ffe21 100644 --- a/modules/home/roles/default.nix +++ b/modules/home/roles/default.nix @@ -83,6 +83,7 @@ in ataraxia.programs.kitty.enable = mkDefault true; ataraxia.programs.mpv.enable = mkDefault true; ataraxia.programs.rofi.enable = mkDefault true; + ataraxia.programs.telegram.enable = mkDefault true; ataraxia.programs.thunderbird.enable = mkDefault true; ataraxia.programs.vscode.enable = mkDefault true; ataraxia.wayland.enable = mkDefault true;