1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

Merge pull request #13 from peel/master

adds emacs launchd service
This commit is contained in:
Daiderd Jordan 2017-02-19 12:01:23 +01:00 committed by GitHub
commit b7c962a0d4
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;
};
};
}