-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a55df26
commit 9be2a57
Showing
5 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
pkgs.discord | ||
pkgs.obsidian | ||
pkgs.spotube | ||
pkgs.liferea | ||
bitwarden-dmenu.packages.${pkgs.system}.bwmenu | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ config, ... }: | ||
{ | ||
imports = [ ./module.nix ]; | ||
|
||
programs.liferea = { | ||
enable = config.local.system.linux && config.local.eagerSetup.installGraphicalApps; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ pkgs, lib, config, ... }: | ||
let | ||
cfg = config.programs.liferea; | ||
in | ||
{ | ||
|
||
options.programs.liferea = { | ||
enable = lib.mkEnableOption "Liferea, a Linux feed reader"; | ||
package = lib.mkPackageOption pkgs "liferea" { }; | ||
|
||
style = lib.mkOption { | ||
type = lib.types.lines; | ||
default = ""; | ||
description = "Text to be written to {file}`$XDG_CONFIG_DIR/liferea/style.css`."; | ||
}; | ||
|
||
settings = lib.mkOption { | ||
type = lib.types.submodule { | ||
freeformType = lib.types.attrsOf lib.types.anything; | ||
options = {}; | ||
}; | ||
default = {}; | ||
description = '' | ||
Liferea settings. | ||
These values are passed directly to the dconf `/org/gnome/liferea` | ||
subkey. | ||
Canonical list of settings: | ||
https://github.com/lwindolf/liferea/blob/master/net.sf.liferea.gschema.xml.in | ||
''; | ||
}; | ||
|
||
plugins = lib.mkOption { | ||
type = lib.types.listOf lib.types.package; | ||
default = [ ]; | ||
description = '' | ||
A list of packages containing Liferea plugins. | ||
The packages will be combined into one directory and placed | ||
into {file}`$XDG_DATA_DIR/liferea/plugins/`. | ||
Each package should have a file with the .plugin extension | ||
at its root, following the default format. | ||
More information: | ||
https://github.com/lwindolf/liferea/blob/master/plugins/README.md | ||
''; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
home.packages = [ cfg.package ]; | ||
|
||
xdg.mimeApps.defaultAssociations = { | ||
# FIXME: Is the absolute path necessary when we append to home.packages? | ||
# Also: Is this too eager? | ||
"application/rss+xml" = "${cfg.package}/share/applications/net.sourceforge.liferea.desktop"; | ||
"application/atom+xml" = "${cfg.package}/share/applications/net.sourceforge.liferea.desktop"; | ||
"application/rdf+xml" = "${cfg.package}/share/applications/net.sourceforge.liferea.desktop"; | ||
"x-scheme-handler/feed" = "${cfg.package}/share/applications/net.sourceforge.liferea.desktop"; | ||
}; | ||
|
||
dconf.settings."org/gnome/liferea" = cfg.settings; | ||
|
||
xdg.configFile."liferea/style.css" = lib.mkIf (cfg.style != "") { | ||
text = cfg.style; | ||
}; | ||
|
||
xdg.dataFile."liferea/plugins" = lib.mkIf (cfg.plugins != [ ]) { | ||
source = pkgs.symlinkJoin { | ||
name = "liferea-plugins"; | ||
paths = cfg.plugins; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters