1 { config, lib, pkgs, ... }:
4 cfg = config.services.packagekit;
7 mkEnableOption mkOption mkIf mkRemovedOptionModule types
8 listToAttrs recursiveUpdate;
10 iniFmt = pkgs.formats.ini { };
13 (iniFmt.generate "PackageKit.conf" (recursiveUpdate
16 DefaultBackend = "test_nop";
22 (iniFmt.generate "Vendor.conf" (recursiveUpdate
24 PackagesNotFound = rec {
25 DefaultUrl = "https://github.com/NixOS/nixpkgs";
26 CodecUrl = DefaultUrl;
27 HardwareUrl = DefaultUrl;
38 (mkRemovedOptionModule [ "services" "packagekit" "backend" ] "Always set to test_nop, Nix backend is broken see #177946.")
41 options.services.packagekit = {
42 enable = mkEnableOption ''
43 PackageKit, a cross-platform D-Bus abstraction layer for
44 installing software. Software utilizing PackageKit can install
45 software regardless of the package manager
51 description = "Additional settings passed straight through to PackageKit.conf";
54 vendorSettings = mkOption {
57 description = "Additional settings passed straight through to Vendor.conf";
61 config = mkIf cfg.enable {
63 services.dbus.packages = with pkgs; [ packagekit ];
65 environment.systemPackages = with pkgs; [ packagekit ];
67 systemd.packages = with pkgs; [ packagekit ];
69 environment.etc = listToAttrs (map
71 lib.nameValuePair "PackageKit/${e.name}" { source = e; })