element: Add themes
All checks were successful
Flake checks / Check (pull_request) Successful in 22m49s
All checks were successful
Flake checks / Check (pull_request) Successful in 22m49s
This commit is contained in:
parent
569bb5f875
commit
a2e7adbc79
18
flake.lock
18
flake.lock
|
@ -70,6 +70,23 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"element-themes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1690602100,
|
||||
"narHash": "sha256-fc/YOx5Py0iOBg2Aw3qjl0SHm+byIjuKdU1b/3q0FXs=",
|
||||
"owner": "aaronraimist",
|
||||
"repo": "element-themes",
|
||||
"rev": "b1dbe27acee74cebe180538ef215208a1c26dc02",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aaronraimist",
|
||||
"ref": "master",
|
||||
"repo": "element-themes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -271,6 +288,7 @@
|
|||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"element-themes": "element-themes",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"keycloak-theme-pub-solar": "keycloak-theme-pub-solar",
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
triton-vmtools.url = "git+https://git.pub.solar/pub-solar/infra-vintage?ref=main&dir=vmtools";
|
||||
triton-vmtools.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
element-themes.url = "github:aaronraimist/element-themes/master";
|
||||
element-themes.flake = false;
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, ... }:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{ pkgs, lib, ... }: {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix.test.pub.solar";
|
||||
|
@ -8,12 +8,11 @@
|
|||
base_url = "";
|
||||
};
|
||||
};
|
||||
# TODO: Add themes
|
||||
# setting_defaults = {
|
||||
# custom_themes = {{ matrix_client_element_setting_defaults_custom_themes | to_json }}
|
||||
# };
|
||||
# default_theme = {{ matrix_client_element_default_theme | string | to_json }};
|
||||
# default_country_code = {{ matrix_client_element_default_country_code | string | to_json }};
|
||||
setting_defaults = {
|
||||
custom_themes = (lib.modules.importJSON "${pkgs.element-themes}").config;
|
||||
};
|
||||
default_theme = "light";
|
||||
default_country_code = "DE";
|
||||
permalink_prefix = "https://matrix.to";
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
'';
|
||||
clientConfig = import ./matrix/element-client-config.nix;
|
||||
clientConfig = import ./matrix/element-client-config.nix { inherit lib pkgs; };
|
||||
wellKnownClient = domain: {
|
||||
"m.homeserver".base_url = "https://matrix.${domain}";
|
||||
"m.identity_server".base_url = "https://matrix.${domain}";
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
forgejo-actions-runner = inputs.unstable.legacyPackages.${prev.system}.forgejo-actions-runner;
|
||||
|
||||
mediawiki = inputs.unstable.legacyPackages.${prev.system}.mediawiki;
|
||||
|
||||
element-themes = prev.callPackage ./pkgs/element-themes { inherit (inputs) element-themes; };
|
||||
})
|
||||
];
|
||||
});
|
||||
|
|
9
overlays/pkgs/element-themes/default.nix
Normal file
9
overlays/pkgs/element-themes/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ stdenvNoCC, jq, element-themes }:
|
||||
stdenvNoCC.mkDerivation {
|
||||
src = element-themes;
|
||||
name = "element-themes";
|
||||
nativeBuildInputs = [ jq ];
|
||||
buildPhase = ''
|
||||
find "$src" -name '*.json' -print0 | xargs -0 jq -s '.' > $out
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue