mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-15 13:31:07 +01:00
element-desktop: add module (#6935)
This commit is contained in:
parent
f045bd46b7
commit
669e813c75
11 changed files with 304 additions and 0 deletions
|
|
@ -326,6 +326,7 @@ import nmtSrc {
|
|||
++ lib.optionals isDarwin [
|
||||
./modules/launchd
|
||||
./modules/programs/aerospace
|
||||
./modules/programs/element-desktop/darwin.nix
|
||||
./modules/services/emacs-darwin
|
||||
./modules/services/espanso-darwin
|
||||
./modules/services/git-sync-darwin
|
||||
|
|
@ -359,6 +360,7 @@ import nmtSrc {
|
|||
./modules/programs/boxxy
|
||||
./modules/programs/cavalier
|
||||
./modules/programs/distrobox
|
||||
./modules/programs/element-desktop/linux.nix
|
||||
./modules/programs/eww
|
||||
./modules/programs/firefox
|
||||
./modules/programs/firefox/firefox.nix
|
||||
|
|
|
|||
19
tests/modules/programs/element-desktop/cfg/default.json
Normal file
19
tests/modules/programs/element-desktop/cfg/default.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"brand": "Element",
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix-client.matrix.org",
|
||||
"server_name": "matrix.org"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://vector.im"
|
||||
}
|
||||
},
|
||||
"disable_3pid_login": false,
|
||||
"disable_custom_urls": false,
|
||||
"disable_guests": false,
|
||||
"disable_login_language_selector": false,
|
||||
"force_verification": false,
|
||||
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||
"integrations_ui_url": "https://scalar.vector.im/"
|
||||
}
|
||||
6
tests/modules/programs/element-desktop/cfg/home.json
Normal file
6
tests/modules/programs/element-desktop/cfg/home.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"disable_3pid_login": false,
|
||||
"disable_custom_urls": false,
|
||||
"disable_guests": false,
|
||||
"disable_login_language_selector": false
|
||||
}
|
||||
6
tests/modules/programs/element-desktop/cfg/other.json
Normal file
6
tests/modules/programs/element-desktop/cfg/other.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"brand": "Element",
|
||||
"force_verification": false,
|
||||
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||
"integrations_ui_url": "https://scalar.vector.im/"
|
||||
}
|
||||
11
tests/modules/programs/element-desktop/cfg/work.json
Normal file
11
tests/modules/programs/element-desktop/cfg/work.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"default_server_config": {
|
||||
"m.homeserver": {
|
||||
"base_url": "https://matrix-client.matrix.org",
|
||||
"server_name": "matrix.org"
|
||||
},
|
||||
"m.identity_server": {
|
||||
"base_url": "https://vector.im"
|
||||
}
|
||||
}
|
||||
}
|
||||
1
tests/modules/programs/element-desktop/darwin.nix
Normal file
1
tests/modules/programs/element-desktop/darwin.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ element-desktop-darwin = ./example-config-darwin.nix; }
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
programs.element-desktop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix-client.matrix.org";
|
||||
server_name = "matrix.org";
|
||||
};
|
||||
"m.identity_server" = {
|
||||
base_url = "https://vector.im";
|
||||
};
|
||||
};
|
||||
disable_custom_urls = false;
|
||||
disable_guests = false;
|
||||
disable_login_language_selector = false;
|
||||
disable_3pid_login = false;
|
||||
force_verification = false;
|
||||
brand = "Element";
|
||||
integrations_ui_url = "https://scalar.vector.im/";
|
||||
integrations_rest_url = "https://scalar.vector.im/api";
|
||||
};
|
||||
profiles = {
|
||||
work = {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix-client.matrix.org";
|
||||
server_name = "matrix.org";
|
||||
};
|
||||
"m.identity_server" = {
|
||||
base_url = "https://vector.im";
|
||||
};
|
||||
};
|
||||
};
|
||||
home = {
|
||||
disable_custom_urls = false;
|
||||
disable_guests = false;
|
||||
disable_login_language_selector = false;
|
||||
disable_3pid_login = false;
|
||||
};
|
||||
other = {
|
||||
force_verification = false;
|
||||
brand = "Element";
|
||||
integrations_ui_url = "https://scalar.vector.im/";
|
||||
integrations_rest_url = "https://scalar.vector.im/api";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists "home-files/Library/Application Support/Element/config.json"
|
||||
assertFileExists "home-files/Library/Application Support/Element-work/config.json"
|
||||
assertFileExists "home-files/Library/Application Support/Element-home/config.json"
|
||||
assertFileExists "home-files/Library/Application Support/Element-other/config.json"
|
||||
|
||||
assertFileContent "home-files/Library/Application Support/Element/config.json" \
|
||||
${./cfg/default.json}
|
||||
|
||||
assertFileContent "home-files/Library/Application Support/Element-work/config.json" \
|
||||
${./cfg/work.json}
|
||||
|
||||
assertFileContent "home-files/Library/Application Support/Element-home/config.json" \
|
||||
${./cfg/home.json}
|
||||
|
||||
assertFileContent "home-files/Library/Application Support/Element-other/config.json" \
|
||||
${./cfg/other.json}
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
programs.element-desktop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix-client.matrix.org";
|
||||
server_name = "matrix.org";
|
||||
};
|
||||
"m.identity_server" = {
|
||||
base_url = "https://vector.im";
|
||||
};
|
||||
};
|
||||
disable_custom_urls = false;
|
||||
disable_guests = false;
|
||||
disable_login_language_selector = false;
|
||||
disable_3pid_login = false;
|
||||
force_verification = false;
|
||||
brand = "Element";
|
||||
integrations_ui_url = "https://scalar.vector.im/";
|
||||
integrations_rest_url = "https://scalar.vector.im/api";
|
||||
};
|
||||
profiles = {
|
||||
work = {
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://matrix-client.matrix.org";
|
||||
server_name = "matrix.org";
|
||||
};
|
||||
"m.identity_server" = {
|
||||
base_url = "https://vector.im";
|
||||
};
|
||||
};
|
||||
};
|
||||
home = {
|
||||
disable_custom_urls = false;
|
||||
disable_guests = false;
|
||||
disable_login_language_selector = false;
|
||||
disable_3pid_login = false;
|
||||
};
|
||||
other = {
|
||||
force_verification = false;
|
||||
brand = "Element";
|
||||
integrations_ui_url = "https://scalar.vector.im/";
|
||||
integrations_rest_url = "https://scalar.vector.im/api";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/Element/config.json
|
||||
assertFileExists home-files/.config/Element-work/config.json
|
||||
assertFileExists home-files/.config/Element-home/config.json
|
||||
assertFileExists home-files/.config/Element-other/config.json
|
||||
|
||||
assertFileContent home-files/.config/Element/config.json \
|
||||
${./cfg/default.json}
|
||||
|
||||
assertFileContent home-files/.config/Element-work/config.json \
|
||||
${./cfg/work.json}
|
||||
|
||||
assertFileContent home-files/.config/Element-home/config.json \
|
||||
${./cfg/home.json}
|
||||
|
||||
assertFileContent home-files/.config/Element-other/config.json \
|
||||
${./cfg/other.json}
|
||||
'';
|
||||
}
|
||||
1
tests/modules/programs/element-desktop/linux.nix
Normal file
1
tests/modules/programs/element-desktop/linux.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ element-desktop-linux = ./example-config-linux.nix; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue