2019-03-26 12:08:58 +01:00
|
|
|
# Evince.
|
|
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2021-10-07 05:52:48 +02:00
|
|
|
let cfg = config.programs.evince;
|
|
|
|
|
|
|
|
in {
|
2019-03-26 12:08:58 +01:00
|
|
|
|
2019-08-09 18:26:15 +02:00
|
|
|
# Added 2019-08-09
|
|
|
|
imports = [
|
|
|
|
(mkRenamedOptionModule
|
|
|
|
[ "services" "gnome3" "evince" "enable" ]
|
|
|
|
[ "programs" "evince" "enable" ])
|
|
|
|
];
|
|
|
|
|
2019-03-26 12:08:58 +01:00
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2019-08-09 18:26:15 +02:00
|
|
|
programs.evince = {
|
2019-03-26 12:08:58 +01:00
|
|
|
|
|
|
|
enable = mkEnableOption
|
2019-08-09 18:26:15 +02:00
|
|
|
"Evince, the GNOME document viewer";
|
2019-03-26 12:08:58 +01:00
|
|
|
|
2021-10-07 05:52:48 +02:00
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.evince;
|
|
|
|
defaultText = literalExpression "pkgs.evince";
|
2022-07-28 23:19:15 +02:00
|
|
|
description = lib.mdDoc "Evince derivation to use.";
|
2021-10-07 05:52:48 +02:00
|
|
|
};
|
|
|
|
|
2019-03-26 12:08:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2019-08-09 18:26:15 +02:00
|
|
|
config = mkIf config.programs.evince.enable {
|
2019-03-26 12:08:58 +01:00
|
|
|
|
2021-10-07 05:52:48 +02:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
2019-03-26 12:08:58 +01:00
|
|
|
|
2021-10-07 05:52:48 +02:00
|
|
|
services.dbus.packages = [ cfg.package ];
|
2019-03-26 12:08:58 +01:00
|
|
|
|
2021-10-07 05:52:48 +02:00
|
|
|
systemd.packages = [ cfg.package ];
|
2019-03-26 12:08:58 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|