nheko: add module
This commit is contained in:
parent
340ec22f6f
commit
6ec6b2e362
9 changed files with 265 additions and 0 deletions
4
tests/modules/programs/nheko/default.nix
Normal file
4
tests/modules/programs/nheko/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
nheko-empty-settings = ./nheko-empty-settings.nix;
|
||||
nheko-example-settings = ./nheko-example-settings.nix;
|
||||
}
|
||||
16
tests/modules/programs/nheko/nheko-empty-settings.nix
Normal file
16
tests/modules/programs/nheko/nheko-empty-settings.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
configDir = if pkgs.stdenv.isDarwin then
|
||||
"home-files/Library/Application Support"
|
||||
else
|
||||
"home-files/.config";
|
||||
in {
|
||||
programs.nheko.enable = true;
|
||||
|
||||
test.stubs.nheko = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists "${configDir}/nheko/nheko.conf"
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
; Generated by Home Manager.
|
||||
|
||||
[auth]
|
||||
access_token=MY_ACCESS_TOKEN
|
||||
device_id=MY_DEVICE
|
||||
home_server=https://matrix-client.matrix.org:443
|
||||
user_id=@@user:matrix.org
|
||||
|
||||
[general]
|
||||
disable_certificate_validation=false
|
||||
|
||||
[settings]
|
||||
scale_factor=0.700000
|
||||
|
||||
[sidebar]
|
||||
width=416
|
||||
|
||||
[user]
|
||||
alert_on_notification=true
|
||||
animate_images_on_hover=false
|
||||
automatically_share_keys_with_trusted_users=false
|
||||
avatar_circles=true
|
||||
bubbles_enabled=false
|
||||
decrypt_sidebar=true
|
||||
desktop_notifications=true
|
||||
emoji_font_family=Noto Emoji
|
||||
expose_dbus_api=false
|
||||
font_family=JetBrainsMonoMedium Nerd Font Mono
|
||||
font_size=9
|
||||
group_view=true
|
||||
markdown_enabled=true
|
||||
minor_events=false
|
||||
mobile_mode=false
|
||||
muted_tags=global
|
||||
online_key_backup=false
|
||||
only_share_keys_with_verified_users=false
|
||||
open_image_external=false
|
||||
open_video_external=false
|
||||
presence=AutomaticPresence
|
||||
privacy_screen=false
|
||||
privacy_screen_timeout=0
|
||||
read_receipts=true
|
||||
ringtone=Mute
|
||||
share_keys_with_trusted_users=true
|
||||
sidebar\community_list_width=40
|
||||
sidebar\room_list_width=308
|
||||
small_avatars_enabled=false
|
||||
sort_by_unread=true
|
||||
space_notifications=true
|
||||
theme=dark
|
||||
timeline\buttons=true
|
||||
timeline\enlarge_emoji_only_msg=true
|
||||
timeline\max_width=0
|
||||
timeline\message_hover_highlight=false
|
||||
typing_notifications=true
|
||||
use_identicon=true
|
||||
use_stun_server=false
|
||||
window\start_in_tray=false
|
||||
window\tray=true
|
||||
|
||||
[window]
|
||||
height=482
|
||||
width=950
|
||||
|
||||
84
tests/modules/programs/nheko/nheko-example-settings.nix
Normal file
84
tests/modules/programs/nheko/nheko-example-settings.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
configDir = if pkgs.stdenv.isDarwin then
|
||||
"home-files/Library/Application Support"
|
||||
else
|
||||
"home-files/.config";
|
||||
in {
|
||||
programs.nheko = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = { disableCertificateValidation = false; };
|
||||
|
||||
auth = {
|
||||
accessToken = "MY_ACCESS_TOKEN";
|
||||
deviceId = "MY_DEVICE";
|
||||
homeServer = "https://matrix-client.matrix.org:443";
|
||||
userId = "@@user:matrix.org";
|
||||
};
|
||||
|
||||
sidebar = { width = 416; };
|
||||
|
||||
settings = { scaleFactor = 0.7; };
|
||||
|
||||
user = {
|
||||
alertOnNotification = true;
|
||||
animateImagesOnHover = false;
|
||||
automaticallyShareKeysWithTrustedUsers = false;
|
||||
avatarCircles = true;
|
||||
bubblesEnabled = false;
|
||||
decryptSidebar = true;
|
||||
desktopNotifications = true;
|
||||
emojiFontFamily = "Noto Emoji";
|
||||
exposeDbusApi = false;
|
||||
fontFamily = "JetBrainsMonoMedium Nerd Font Mono";
|
||||
fontSize = 9;
|
||||
groupView = true;
|
||||
markdownEnabled = true;
|
||||
minorEvents = false;
|
||||
mobileMode = false;
|
||||
mutedTags = "global";
|
||||
onlineKeyBackup = false;
|
||||
onlyShareKeysWithVerifiedUsers = false;
|
||||
openImageExternal = false;
|
||||
openVideoExternal = false;
|
||||
presence = "AutomaticPresence";
|
||||
privacyScreen = false;
|
||||
privacyScreenTimeout = 0;
|
||||
readReceipts = true;
|
||||
ringtone = "Mute";
|
||||
shareKeysWithTrustedUsers = true;
|
||||
smallAvatarsEnabled = false;
|
||||
"sidebar\\communityListWidth" = 40;
|
||||
"sidebar\\roomListWidth" = 308;
|
||||
sortByUnread = true;
|
||||
spaceNotifications = true;
|
||||
theme = "dark";
|
||||
"timeline\\buttons" = true;
|
||||
"timeline\\enlargeEmojiOnlyMsg" = true;
|
||||
"timeline\\maxWidth" = 0;
|
||||
"timeline\\messageHoverHighlight" = false;
|
||||
typingNotifications = true;
|
||||
useIdenticon = true;
|
||||
useStunServer = false;
|
||||
"window\\startInTray" = false;
|
||||
"window\\tray" = true;
|
||||
};
|
||||
|
||||
window = {
|
||||
height = 482;
|
||||
width = 950;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.nheko = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
"${configDir}/nheko/nheko.conf" \
|
||||
${./nheko-example-settings-expected-config.ini}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue