mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
commit
b7c962a0d4
2 changed files with 42 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue