Compare commits
No commits in common. "a48d9ae8d0662b4a8385db6a5f8d5d928b395aff" and "c059379233155a53ce0225f34c7d71a8968a0399" have entirely different histories.
a48d9ae8d0
...
c059379233
3 changed files with 13 additions and 30 deletions
|
@ -8,23 +8,13 @@ let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
inherit (lib.lists) singleton;
|
inherit (lib.lists) singleton;
|
||||||
inherit (builtins) toJSON;
|
|
||||||
|
|
||||||
cfg = config.modules.system.services.matrix;
|
cfg = config.modules.system.services.matrix;
|
||||||
|
|
||||||
registrationToken = config.sops.secrets.tuwunel_token_file.path;
|
registrationToken = config.sops.secrets.tuwunel_token_file.path;
|
||||||
|
|
||||||
port = 4926;
|
port = 4926;
|
||||||
domain = "faukah.com";
|
domain = "matrix.faukah.com";
|
||||||
|
|
||||||
# Taken from Max Privatevoid.
|
|
||||||
serverFederation = pkgs.writeText "server_federation.json" (toJSON {
|
|
||||||
"m.server" = "matrix.${domain}:443";
|
|
||||||
});
|
|
||||||
|
|
||||||
clientFederation = pkgs.writeText "client_federation.json" (toJSON {
|
|
||||||
"m.homeserver".base_url = "https://matrix.${domain}";
|
|
||||||
});
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.system.services.matrix.enable = mkEnableOption "matrix";
|
options.modules.system.services.matrix.enable = mkEnableOption "matrix";
|
||||||
|
@ -35,16 +25,10 @@ in
|
||||||
virtualHosts.${domain} = {
|
virtualHosts.${domain} = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = {
|
locations."/" = {
|
||||||
"= /.well-known/matrix/server".alias = serverFederation;
|
proxyPass = "http://localhost:${toString port}";
|
||||||
"= /.well-known/matrix/client".alias = clientFederation;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
virtualHosts."matrix.${domain}" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/_matrix".proxyPass = "http://localhost:${toString port}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
matrix-tuwunel = {
|
matrix-tuwunel = {
|
||||||
|
@ -61,7 +45,6 @@ in
|
||||||
allow_registration = true;
|
allow_registration = true;
|
||||||
allow_federation = true;
|
allow_federation = true;
|
||||||
allow_encryption = true;
|
allow_encryption = true;
|
||||||
new_user_displayname_suffix = "";
|
|
||||||
registration_token_file = registrationToken;
|
registration_token_file = registrationToken;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
_: {
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
|
|
|
@ -295,29 +295,29 @@ in
|
||||||
(plain "Mod+Shift+Equal" [ (leaf "set-window-height" [ "+10%" ]) ])
|
(plain "Mod+Shift+Equal" [ (leaf "set-window-height" [ "+10%" ]) ])
|
||||||
(plain "Mod+Shift+F" [ (flag "fullscreen-window") ])
|
(plain "Mod+Shift+F" [ (flag "fullscreen-window") ])
|
||||||
(plain "Mod+Shift+H" [ (flag "move-column-left-or-to-monitor-left") ])
|
(plain "Mod+Shift+H" [ (flag "move-column-left-or-to-monitor-left") ])
|
||||||
(plain "Mod+Shift+I" [ (flag "move-column-to-workspace-up") ])
|
# (plain "Mod+Shift+I" [ (flag "move-column-to-workspace-up") ])
|
||||||
(plain "Mod+Shift+J" [ (flag "move-window-down-or-to-workspace-down") ])
|
# (plain "Mod+Shift+J" [ (flag "move-window-down-or-to-workspace-down") ])
|
||||||
(plain "Mod+Shift+K" [ (flag "move-window-up-or-to-workspace-up") ])
|
# (plain "Mod+Shift+K" [ (flag "move-window-up-or-to-workspace-up") ])
|
||||||
(plain "Mod+Shift+L" [ (flag "move-column-right-or-to-monitor-right") ])
|
(plain "Mod+Shift+L" [ (flag "move-column-right-or-to-monitor-right") ])
|
||||||
(plain "Mod+Shift+Minus" [ (leaf "set-window-height" [ "-10%" ]) ])
|
(plain "Mod+Shift+Minus" [ (leaf "set-window-height" [ "-10%" ]) ])
|
||||||
(plain "Mod+Shift+Page_Down" [ (flag "move-column-to-workspace-down") ])
|
# (plain "Mod+Shift+Page_Down" [ (flag "move-column-to-workspace-down") ])
|
||||||
(plain "Mod+Shift+Page_Up" [ (flag "move-column-to-workspace-up") ])
|
(plain "Mod+Shift+Page_Up" [ (flag "move-column-to-workspace-up") ])
|
||||||
(plain "Mod+Shift+P" [ (flag "power-off-monitors") ])
|
(plain "Mod+Shift+P" [ (flag "power-off-monitors") ])
|
||||||
(plain "Mod+Shift+R" [ (flag "switch-preset-window-height") ])
|
(plain "Mod+Shift+R" [ (flag "switch-preset-window-height") ])
|
||||||
(plain "Mod+Shift+U" [ (flag "move-column-to-workspace-down") ])
|
# (plain "Mod+Shift+U" [ (flag "move-column-to-workspace-down") ])
|
||||||
(plain "Mod+Shift+V" [ (flag "switch-focus-between-floating-and-tiling") ])
|
(plain "Mod+Shift+V" [ (flag "switch-focus-between-floating-and-tiling") ])
|
||||||
(plain "Mod+Shift+WheelScrollDown" [ (flag "move-column-to-workspace-down") ])
|
# (plain "Mod+Shift+WheelScrollDown" [ (flag "move-column-to-workspace-down") ])
|
||||||
(plain "Mod+Shift+WheelScrollLeft" [ (flag "move-column-left") ])
|
(plain "Mod+Shift+WheelScrollLeft" [ (flag "move-column-left") ])
|
||||||
(plain "Mod+Shift+WheelScrollRight" [ (flag "move-column-right") ])
|
(plain "Mod+Shift+WheelScrollRight" [ (flag "move-column-right") ])
|
||||||
(plain "Mod+Shift+WheelScrollUp" [ (flag "move-column-to-workspace-up") ])
|
# (plain "Mod+Shift+WheelScrollUp" [ (flag "move-column-to-workspace-up") ])
|
||||||
(plain "Mod+T" [ (flag "screenshot") ])
|
(plain "Mod+T" [ (flag "screenshot") ])
|
||||||
(plain "Mod+U" [ (flag "focus-workspace-down") ])
|
(plain "Mod+U" [ (flag "focus-workspace-down") ])
|
||||||
(plain "Mod+V" [ (flag "toggle-window-floating") ])
|
(plain "Mod+V" [ (flag "toggle-window-floating") ])
|
||||||
(plain "Mod+W" [ (flag "toggle-column-tabbed-display") ])
|
(plain "Mod+W" [ (flag "toggle-column-tabbed-display") ])
|
||||||
(plain "Mod+WheelScrollDown" [ (flag "focus-workspace-down") ])
|
# (plain "Mod+WheelScrollDown" [ (flag "focus-workspace-down") ])
|
||||||
(plain "Mod+WheelScrollLeft" [ (flag "focus-column-left") ])
|
(plain "Mod+WheelScrollLeft" [ (flag "focus-column-left") ])
|
||||||
(plain "Mod+WheelScrollRight" [ (flag "focus-column-right") ])
|
(plain "Mod+WheelScrollRight" [ (flag "focus-column-right") ])
|
||||||
(plain "Mod+WheelScrollUp" [ (flag "focus-workspace-up") ])
|
# (plain "Mod+WheelScrollUp" [ (flag "focus-workspace-up") ])
|
||||||
(plain "Print" [ (flag "screenshot") ])
|
(plain "Print" [ (flag "screenshot") ])
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue