diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2016-06-16 19:18:09 +0000 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2016-07-05 20:26:59 +0000 |
commit | 4e50880c828a771ab9ea72739bb70017b724358c (patch) | |
tree | f037fc9a2f796591b4f616d4f33ea4e1bb35e8b0 /nixos/modules/services/misc | |
parent | dedfc00204ba1a35ae620ceb25709d4618bca17a (diff) | |
download | nixlib-4e50880c828a771ab9ea72739bb70017b724358c.tar nixlib-4e50880c828a771ab9ea72739bb70017b724358c.tar.gz nixlib-4e50880c828a771ab9ea72739bb70017b724358c.tar.bz2 nixlib-4e50880c828a771ab9ea72739bb70017b724358c.tar.lz nixlib-4e50880c828a771ab9ea72739bb70017b724358c.tar.xz nixlib-4e50880c828a771ab9ea72739bb70017b724358c.tar.zst nixlib-4e50880c828a771ab9ea72739bb70017b724358c.zip |
packagekit: add latest from hughsie's github repo
- currently pulled in from Git until the next release of PackageKit has Nix support - also: add in a service module to start packagekit properly - nixos service can be enabled via services.packagekit.enable - packagekit requires nixunstable to build properly
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r-- | nixos/modules/services/misc/packagekit.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/packagekit.nix b/nixos/modules/services/misc/packagekit.nix new file mode 100644 index 000000000000..2d1ff7bb4117 --- /dev/null +++ b/nixos/modules/services/misc/packagekit.nix @@ -0,0 +1,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; + + }; + +} |