marleyos/home/amfora/default.nix
punkfairie 9d97f5262f
🐛 fix(amfora): Add required config
Amfora seems to require something in the default config structure to
run. I don't care to figure out exactly what is required at the moment.
2024-11-03 09:39:37 -08:00

73 lines
1.6 KiB
Nix

{ pkgs, inputs, ... }:
{
home.packages = with pkgs; [
amfora
];
# TODO: Change this based on current theme.
# Possibly set this in rose-pine-nix as well?
# There is no programs.amfora so it would require adding attl opts to base
# rose-pine.
xdg.configFile."amfora/theme.toml".source = "${inputs.rose-pine-amfora}/themes/rose-pine.toml";
# https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml
# Amfora requires a number of options to run - omitting everything didn't care
# to customize resulted in go panic errors.
xdg.configFile."amfora/config.toml".text = # toml
''
include = "./theme.toml"
[a-general]
# Defaults {{{
home = "gemini://geminiprotocol.net"
auto_redirect = false
http = 'default'
search = "gemini://geminispace.info/search"
color = true
ansi = true
highlight_code = true
bullets = true
show_link = false
max_width = 80
downloads = '''
page_max_size = 2097152 # 2 MiB
page_max_time = 10
scrollbar = "auto"
underline = true
# }}}
# TODO: Change based on current theme.
highlight_style = "rose-pine"
# Defaults {{{
[auth]
[auth.certs]
[auth.keys]
[keybindings]
[url-handlers]
other = 'default'
[url-prompts]
[cache]
max_size = 0
max_pages = 30
timeout = 1800
[proxies]
[subscriptions]
popup = true
update_interval = 1800
workers = 3
entries_per_page = 20
header = true
[theme]
# }}}
'';
}