mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 12:11:28 +00:00
0a37316d6c
This commit replaces a lot of usages of `mkOption` with the package type, to be `mkPackageOption`, in order to reduce the amount of code.
47 lines
684 B
Nix
47 lines
684 B
Nix
# Evince.
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.programs.evince;
|
|
|
|
in {
|
|
|
|
# Added 2019-08-09
|
|
imports = [
|
|
(mkRenamedOptionModule
|
|
[ "services" "gnome3" "evince" "enable" ]
|
|
[ "programs" "evince" "enable" ])
|
|
];
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
programs.evince = {
|
|
|
|
enable = mkEnableOption
|
|
(lib.mdDoc "Evince, the GNOME document viewer");
|
|
|
|
package = mkPackageOption pkgs "evince" { };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf config.programs.evince.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
services.dbus.packages = [ cfg.package ];
|
|
|
|
systemd.packages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|