Skip to content

Commit 0e389d5

Browse files
committed
feat(programs): add iamb with clean config and tests
1 parent b0ce9bf commit 0e389d5

4 files changed

Lines changed: 80 additions & 0 deletions

File tree

programs/iamb.nix

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{ pkgs, ... }:
2+
3+
{
4+
home.packages = [
5+
pkgs.iamb
6+
];
7+
8+
programs.bash.shellAliases = {
9+
matrix = "iamb";
10+
};
11+
12+
# Declarative iamb configuration (~/.config/iamb/config.toml)
13+
xdg.configFile."iamb/config.toml".text = ''
14+
[profiles."matrix.org"]
15+
user_id = "@brantes:matrix.org"
16+
17+
[settings]
18+
render_markdown = true
19+
20+
[settings.image_preview]
21+
protocol = { type = "sixel" }
22+
23+
[settings.notifications]
24+
enabled = true
25+
via = "bell"
26+
27+
[settings.message_format]
28+
markdown = true
29+
html = true
30+
31+
[logging]
32+
level = "info"
33+
'';
34+
}

programs/weechat.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{ pkgs, ... }:
2+
3+
{
4+
home.packages = [
5+
(pkgs.weechat.override {
6+
configure = { availablePlugins, ... }: {
7+
plugins = with availablePlugins; [
8+
(python.withPackages (ps: with ps; [
9+
pyopenssl
10+
matrix-client
11+
future
12+
dbus-python
13+
]))
14+
lua
15+
perl
16+
];
17+
scripts = with pkgs.weechatScripts; [
18+
weechat-matrix
19+
];
20+
};
21+
})
22+
];
23+
}

tests/programs/test_iamb.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import subprocess
2+
import pytest
3+
4+
def test_iamb_installed(home_manager_build):
5+
"""Verifies that the iamb binary is installed."""
6+
bin_path = home_manager_build / "home-path/bin/iamb"
7+
assert bin_path.exists()
8+
assert bin_path.is_file()
9+
10+
def test_iamb_alias(home_manager_build):
11+
"""Verifies that the 'matrix' alias is present in bashrc."""
12+
bashrc = home_manager_build / "home-files/.bashrc"
13+
content = bashrc.read_text()
14+
assert "alias matrix=" in content
15+
assert "iamb" in content

tests/programs/test_weechat.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import subprocess
2+
import pytest
3+
4+
def test_weechat_installed(home_manager_build):
5+
"""Verifies that the weechat binary is installed."""
6+
bin_path = home_manager_build / "home-path/bin/weechat"
7+
assert bin_path.exists()
8+
assert bin_path.is_file()

0 commit comments

Comments
 (0)