diff options
| author | Thibault Gagnaux <thibault@gagnaux.ch> | 2020-08-30 18:06:40 +0200 |
|---|---|---|
| committer | Thibault Gagnaux <thibault@gagnaux.ch> | 2020-08-30 18:06:40 +0200 |
| commit | 91504bd926dd451f149904157109c39d4d2788c8 (patch) | |
| tree | 3a91223bd2bb24bdfa643b864f5b80d3e0ced1bf /modules | |
| parent | 30593350fd91f25b68bfa44cf5f948e481262258 (diff) | |
Removes zsh and getEnv and adds needed NIX_PATH env.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/services/lorri.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/services/lorri.nix b/modules/services/lorri.nix index 9e2dfd6..cefd005 100644 --- a/modules/services/lorri.nix +++ b/modules/services/lorri.nix @@ -4,7 +4,6 @@ with lib; let cfg = config.services.lorri; - home = "${builtins.getEnv "HOME"}"; in { options = { @@ -14,11 +13,11 @@ in default = false; description = "Whether to enable the lorri service."; }; - + logFile = mkOption { type = types.nullOr types.path; - default = "${home}/Library/Logs/lorri.log"; - example = "${home}/Library/Logs/lorri.log"; + default = "/var/tmp/lorri.log"; + example = "/var/tmp/lorri.log"; description = '' The logfile to use for the lorri service. Alternatively <command>sudo launchctl debug system/com.target.lorri --stderr</command> @@ -32,14 +31,15 @@ in config = mkIf cfg.enable { environment.systemPackages = [ pkgs.lorri ]; launchd.user.agents.lorri = { + command = with pkgs; "${lorri}/bin/lorri daemon"; + path = with pkgs; [ nix ]; serviceConfig = { - Label = "com.target.lorri"; - ProgramArguments = with pkgs; ["${zsh}/bin/zsh" "-c" "${lorri}/bin/lorri daemon"]; KeepAlive = true; RunAtLoad = true; ProcessType = "Background"; StandardOutPath = cfg.logFile; StandardErrorPath = cfg.logFile; + EnvironmentVariables = { NIX_PATH = "nixpkgs=" + toString pkgs.path; }; }; }; }; |
