lorri: allow customization of the lorri package

PR #1158
This commit is contained in:
Wael M. Nasreddine 2020-04-15 16:06:47 -07:00 committed by Robert Helgesson
parent 95b95b1407
commit ad8b644de1
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -9,10 +9,19 @@ let
in { in {
meta.maintainers = [ maintainers.gerschtli ]; meta.maintainers = [ maintainers.gerschtli ];
options = { services.lorri.enable = mkEnableOption "lorri build daemon"; }; options.services.lorri = {
enable = mkEnableOption "lorri build daemon";
package = mkOption {
type = types.package;
default = pkgs.lorri;
defaultText = literalExample "pkgs.lorri";
description = "Which lorri package to install.";
};
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ pkgs.lorri ]; home.packages = [ cfg.package ];
systemd.user = { systemd.user = {
services.lorri = { services.lorri = {
@ -24,7 +33,7 @@ in {
}; };
Service = { Service = {
ExecStart = "${pkgs.lorri}/bin/lorri daemon"; ExecStart = "${cfg.package}/bin/lorri daemon";
PrivateTmp = true; PrivateTmp = true;
ProtectSystem = "strict"; ProtectSystem = "strict";
ProtectHome = "read-only"; ProtectHome = "read-only";