about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-01-15 12:00:25 -0800
committerFranck Cuny <franck@fcuny.net>2023-01-15 12:05:48 -0800
commite7b60899bcffd63576de1a5ca1bf140757aa1fa1 (patch)
treeaf04ad94b0ae388fdec61a8604c0d915ca34d246
parentref(home/python): use the default version (diff)
downloadworld-e7b60899bcffd63576de1a5ca1bf140757aa1fa1.tar.gz
ref(home/matrix): replace element by fractal
fractal(-next) is a client for matrix. It's GTK4 native and uses rust.
While not much nicer looking than element, it's not an electron app,
which I prefer (electron is slow, and element would freeze/crash from
time to time).

I renamed the module from element to matrix-client, in case I switch to
something else in the future (or if there are additional
configurations).
Diffstat (limited to '')
-rw-r--r--home/default.nix2
-rw-r--r--home/element/default.nix11
-rw-r--r--home/matrix-client/default.nix15
-rw-r--r--home/wm/sway/default.nix3
-rw-r--r--hosts/aptos/home.nix2
5 files changed, 19 insertions, 14 deletions
diff --git a/home/default.nix b/home/default.nix
index e89d8c7..9193392 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -7,7 +7,6 @@
     ./direnv
     ./documentation
     ./drone-cli
-    ./element
     ./emacs
     ./eog
     ./evince
@@ -20,6 +19,7 @@
     ./gpg
     ./gtk
     ./mail
+    ./matrix-client
     ./mpv
     ./packages
     ./pass
diff --git a/home/element/default.nix b/home/element/default.nix
deleted file mode 100644
index 1b6bb3b..0000000
--- a/home/element/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ lib, config, pkgs, ... }:
-let cfg = config.my.home.element;
-in
-{
-  options.my.home.element = with lib; {
-    enable = mkEnableOption "element configuration";
-  };
-
-  config =
-    lib.mkIf cfg.enable { home.packages = with pkgs; [ element-desktop-wayland ]; };
-}
diff --git a/home/matrix-client/default.nix b/home/matrix-client/default.nix
new file mode 100644
index 0000000..a5a420f
--- /dev/null
+++ b/home/matrix-client/default.nix
@@ -0,0 +1,15 @@
+{ lib, config, pkgs, ... }:
+let cfg = config.my.home.matrix-client;
+in
+{
+  options.my.home.matrix-client = with lib; {
+    enable = mkEnableOption "matrix client configuration";
+  };
+
+  # https://gitlab.gnome.org/GNOME/fractal
+  # fractal-next is a GTK4 client for matrix, using the
+  # matrix-rust-sdk. I used to use element, an electron application,
+  # and it had a number of issues (freeze, crash, heavy, ...).
+  config =
+    lib.mkIf cfg.enable { home.packages = with pkgs; [ fractal-next ]; };
+}
diff --git a/home/wm/sway/default.nix b/home/wm/sway/default.nix
index ae8316f..c89824c 100644
--- a/home/wm/sway/default.nix
+++ b/home/wm/sway/default.nix
@@ -96,11 +96,12 @@ in
           };
         };
 
+
         assigns = {
           "1" = [{ app_id = "emacs"; }];
           "2" = [{ app_id = "Alacritty"; }];
           "3" = [{ app_id = "firefox"; }];
-          "4" = [{ class = "Element"; }];
+          "4" = [{ app_id = "org.gnome.Fractal"; }];
         };
 
         output = {
diff --git a/hosts/aptos/home.nix b/hosts/aptos/home.nix
index 2faaa82..5bc02db 100644
--- a/hosts/aptos/home.nix
+++ b/hosts/aptos/home.nix
@@ -19,8 +19,8 @@
     vlc.enable = true;
 
     # communication
-    element.enable = true;
     mail.enable = true;
+    matrix-client.enable = true;
 
     # terminal
     direnv.enable = true;