1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-16 16:19:44 +01:00

lorri: add service

This commit is contained in:
Tobias Happ 2019-11-16 22:05:08 +01:00 committed by Robert Helgesson
parent 595150be86
commit 286dd9b308
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 66 additions and 0 deletions

View file

@ -1229,6 +1229,13 @@ in
it anymore. it anymore.
''; '';
} }
{
time = "2019-11-17T18:47:40+00:00";
message = ''
A new module is available: 'services.lorri'.
'';
}
]; ];
}; };
} }

View file

@ -115,6 +115,7 @@ let
(loadModule ./services/kdeconnect.nix { }) (loadModule ./services/kdeconnect.nix { })
(loadModule ./services/keepassx.nix { }) (loadModule ./services/keepassx.nix { })
(loadModule ./services/keybase.nix { }) (loadModule ./services/keybase.nix { })
(loadModule ./services/lorri.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/mbsync.nix { }) (loadModule ./services/mbsync.nix { })
(loadModule ./services/mpd.nix { }) (loadModule ./services/mpd.nix { })
(loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; }) (loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; })

View file

@ -0,0 +1,58 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.lorri;
in
{
meta.maintainers = [ maintainers.gerschtli ];
options = {
services.lorri.enable = mkEnableOption "lorri build daemon";
};
config = mkIf cfg.enable {
home.packages = [ pkgs.lorri ];
systemd.user = {
services.lorri = {
Unit = {
Description = "lorri build daemon";
Requires = "lorri.socket";
After = "lorri.socket";
RefuseManualStart = true;
};
Service = {
ExecStart = "${pkgs.lorri}/bin/lorri daemon";
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = "read-only";
Restart = "on-failure";
Environment =
let path = with pkgs; makeSearchPath "bin" [ nix gnutar gzip ];
in "PATH=${path}";
};
};
sockets.lorri = {
Unit = {
Description = "Socket for lorri build daemon";
};
Socket = {
ListenStream = "%t/lorri/daemon.socket";
RuntimeDirectory = "lorri";
};
Install = {
WantedBy = [ "sockets.target" ];
};
};
};
};
}