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:
parent
595150be86
commit
286dd9b308
3 changed files with 66 additions and 0 deletions
|
@ -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'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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; })
|
||||||
|
|
58
modules/services/lorri.nix
Normal file
58
modules/services/lorri.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue