2017-12-31 04:10:15 +00:00
|
|
|
# flatpak service.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2018-02-13 01:09:51 +00:00
|
|
|
let
|
|
|
|
cfg = config.services.flatpak;
|
|
|
|
in {
|
2018-05-11 05:00:44 +01:00
|
|
|
meta = {
|
|
|
|
doc = ./flatpak.xml;
|
|
|
|
maintainers = pkgs.flatpak.meta.maintainers;
|
|
|
|
};
|
|
|
|
|
2017-12-31 04:10:15 +00:00
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
services.flatpak = {
|
|
|
|
enable = mkEnableOption "flatpak";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
2018-02-13 01:09:51 +00:00
|
|
|
config = mkIf cfg.enable {
|
2019-07-10 15:01:25 +01:00
|
|
|
|
2017-12-31 04:10:15 +00:00
|
|
|
environment.systemPackages = [ pkgs.flatpak ];
|
|
|
|
|
2019-07-10 15:01:25 +01:00
|
|
|
services.dbus.packages = [ pkgs.flatpak ];
|
2018-02-13 01:09:51 +00:00
|
|
|
|
2019-07-10 15:01:25 +01:00
|
|
|
systemd.packages = [ pkgs.flatpak ];
|
2017-12-31 04:10:15 +00:00
|
|
|
|
2018-05-21 12:42:51 +01:00
|
|
|
environment.profiles = [
|
|
|
|
"$HOME/.local/share/flatpak/exports"
|
|
|
|
"/var/lib/flatpak/exports"
|
|
|
|
];
|
2017-12-31 04:10:15 +00:00
|
|
|
};
|
|
|
|
}
|