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:
parent
a1011ad98b
commit
79c902422a
@ -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
|
||||
|
41
modules/services/emacs.nix
Normal file
41
modules/services/emacs.nix
Normal 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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user