1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-11-09 20:38:22 +03:00

adds emacs launchd service

This commit is contained in:
Piotr Limanowski 2017-02-19 11:20:26 +01:00
parent a1011ad98b
commit 79c902422a
2 changed files with 42 additions and 0 deletions

View File

@ -38,6 +38,7 @@ let
./modules/services/activate-system.nix
./modules/services/khd.nix
./modules/services/kwm.nix
./modules/services/emacs.nix
./modules/services/nix-daemon.nix
./modules/programs/bash.nix
./modules/programs/fish.nix

View File

@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.emacs;
in
{
options = {
services.emacs = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the Emacs Daemon.";
};
package = mkOption {
type = types.path;
default = pkgs.emacs;
description = "This option specifies the emacs package to use.";
};
};
};
config = mkIf cfg.enable {
launchd.user.agents.emacs = {
serviceConfig.ProgramArguments = [
"${cfg.package}/bin/emacs"
"--daemon"
];
serviceConfig.RunAtLoad = true;
};
};
}