blob: 2d1ff7bb411708556af194e614d78c052d496b60 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.packagekit;
backend = "nix";
packagekitConf = ''
[Daemon]
DefaultBackend=${backend}
KeepCache=false
'';
vendorConf = ''
[PackagesNotFound]
DefaultUrl=https://github.com/NixOS/nixpkgs
CodecUrl=https://github.com/NixOS/nixpkgs
HardwareUrl=https://github.com/NixOS/nixpkgs
FontUrl=https://github.com/NixOS/nixpkgs
MimeUrl=https://github.com/NixOS/nixpkgs
'';
in
{
options = {
services.packagekit = {
enable = mkEnableOption
''
PackageKit provides a cross-platform D-Bus abstraction layer for
installing software. Software utilizing PackageKit can install
software regardless of the package manager.
'';
};
};
config = mkIf cfg.enable {
services.dbus.packages = [ pkgs.packagekit ];
systemd.services.packagekit = {
description = "PackageKit Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.packagekit}/libexec/packagekitd";
serviceConfig.User = "root";
serviceConfig.BusName = "org.freedesktop.PackageKit";
serviceConfig.Type = "dbus";
};
environment.etc."PackageKit/PackageKit.conf".text = packagekitConf;
environment.etc."PackageKit/Vendor.conf".text = vendorConf;
};
}
|