diff --git a/modules/default.nix b/modules/default.nix index a983377..a78dbae 100755 --- a/modules/default.nix +++ b/modules/default.nix @@ -9,6 +9,7 @@ device: ./applications/okular.nix ./applications/yt-utilities.nix ./applications/firefox.nix + ./applications/spectral.nix ./workspace/sway ./workspace/i3blocks ./workspace/zsh.nix diff --git a/modules/matrix-synapse.nix b/modules/matrix-synapse.nix index 35d04df..c741e64 100644 --- a/modules/matrix-synapse.nix +++ b/modules/matrix-synapse.nix @@ -49,33 +49,41 @@ mkdir -p /var/lib/mautrix-whatsapp cd /var/lib/mautrix-whatsapp sleep 5 - timeout 900 mautrix-whatsapp -c ${ + mautrix-whatsapp -c ${ builtins.toFile "config_wa.yaml" - (builtins.toJSON config.secrets.matrix.mautrix-whatsapp.config) + (builtins.toJSON config.secrets.matrix.mautrix-whatsapp.config) } ''; }; - systemd.services.mautrix-telegram = { - description = "A bridge between telegram and matrix"; - requires = [ "matrix-synapse.service" ]; - path = with pkgs; [ coreutils mautrix-telegram ]; - serviceConfig = { - Restart = "always"; - RestartSec = 1; - }; - wantedBy = [ "network-online.target" ]; - script = '' - mkdir -p /var/lib/mautrix-telegram - cp -r ${pkgs.mautrix-telegram}/* /var/lib/mautrix-telegram - cd /var/lib/mautrix-telegram - alembic upgrade head || echo "update failed" - sleep 5 - cp ${ - builtins.toFile "config.yaml" - (builtins.toJSON config.secrets.matrix.mautrix-telegram.config) - } ./config.yaml - timeout 900 mautrix-telegram - ''; + # systemd.services.mautrix-telegram = { + # description = "A bridge between telegram and matrix"; + # requires = [ "matrix-synapse.service" ]; + # path = with pkgs; [ coreutils mautrix-telegram ]; + # serviceConfig = { + # Restart = "always"; + # RestartSec = 1; + # }; + # wantedBy = [ "network-online.target" ]; + # script = '' + # mkdir -p /var/lib/mautrix-telegram + # cp -r ${pkgs.mautrix-telegram}/* /var/lib/mautrix-telegram + # cd /var/lib/mautrix-telegram + # alembic upgrade head || echo "update failed" + # sleep 5 + # cp ${ + # builtins.toFile "config.yaml" + # (builtins.toJSON config.secrets.matrix.mautrix-telegram.config) + # } ./config.yaml + # timeout 900 mautrix-telegram + # ''; + # }; + + services.mautrix-telegram = { + enable = true; + settings = config.secrets.matrix.mautrix-telegram.config; }; + + systemd.services.mautrix-telegram.serviceConfig.DynamicUser = lib.mkForce false; + users.users.matrix-synapse.name = lib.mkForce "matrix-synapse"; } diff --git a/modules/packages.nix b/modules/packages.nix index fa80547..652d89a 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -25,7 +25,7 @@ in { inherit (nur.balsoft.pkgs) termNote nix-patch; - inherit (old) mautrix-telegram; + # inherit (old) mautrix-telegram; inherit (inputs.lambda-launcher.packages.x86_64-linux) lambda-launcher; diff --git a/secret.nix b/secret.nix index bd99e60..4c19105 100644 Binary files a/secret.nix and b/secret.nix differ