{ config, lib, pkgs, ... }: let cfg = config.profiles.multimedia; fixSopsPrefix = x: y: builtins.replaceStrings [ "%r" ] [ "/run/user/${toString x}" ] y; in { imports = [ ../../../modules/nixpkgs.nix ]; options.profiles.multimedia = { enable = lib.mkEnableOption "A profile that enables the system to be used for consuming multimedia contents."; }; config = lib.mkIf cfg.enable { home.packages = with pkgs; [ vlc playerctl cider spotify ]; sops.secrets.freshrss-api-password = { }; programs.newsboat = { enable = true; autoReload = true; extraConfig = '' urls-source "freshrss" freshrss-url "https://rss.exotic.sh/api/greader.php" freshrss-login "sefidel" freshrss-passwordeval "cat ${fixSopsPrefix 1000 config.sops.secrets.freshrss-api-password.path}" # Vim-like movement bind-key j down feedlist bind-key k up feedlist bind-key j next articlelist bind-key k prev articlelist bind-key J next-feed articlelist bind-key K prev-feed articlelist bind-key j down article bind-key k up article # Colorscheme to work with softjelly color listnormal white default color listnormal_unread white default color listfocus white default reverse bold color listfocus_unread white default reverse bold color info yellow black color background white default color article white default # Additional Highlight groups highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold highlight article "(^Link:.*|^Date:.*)" default default highlight article "https?://[^ ]+" green default highlight article "^(Title):.*$" blue default highlight article "\\[[0-9][0-9]*\\]" magenta default bold highlight article "\\[image\\ [0-9]+\\]" green default bold highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold highlight article ":.*\\(link\\)$" cyan default highlight article ":.*\\(image\\)$" blue default highlight article ":.*\\(embedded flash\\)$" magenta default ''; }; nixpkgs.allowedUnfree = [ "spotify" ]; }; }