diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 3e97b1c..afaa79b 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -12,6 +12,7 @@ in qt = enabled; }; programs = { + amfora = enabled; fish = enabled; journalctl = enabled; neo = enabled; diff --git a/modules/home/programs/amfora/default.nix b/modules/home/programs/amfora/default.nix new file mode 100644 index 0000000..d59f140 --- /dev/null +++ b/modules/home/programs/amfora/default.nix @@ -0,0 +1,92 @@ +{ + lib, + config, + namespace, + pkgs, + inputs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.programs.amfora; + inherit (config.${namespace}) theme; + + themeFiles = { + rose-pine = "${inputs.rose-pine-amfora}/themes/rose-pine.toml"; + }; + + themeFile = themeFiles.${theme.colors.base}; +in +{ + options = mkEnableModule "programs.amfora"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + amfora + ]; + + xdg.configFile."amfora/theme.toml".source = "${themeFile}"; + + # https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml + # Amfora requires a number of options to run - omitting everything I 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 + # }}} + + highlight_style = "${theme.colors.base}" + + # 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] + # }}} + ''; + }; +} diff --git a/old/home/programs/amfora.nix b/old/home/programs/amfora.nix deleted file mode 100644 index 4265d24..0000000 --- a/old/home/programs/amfora.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ pkgs, flake, ... }: -{ - 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 = "${flake.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] - # }}} - ''; -}