Emacs launchd agent

This commit is contained in:
Nathan McCarty 2022-10-15 05:20:05 -04:00
parent 12f2029f49
commit fab273bf4e
2 changed files with 21 additions and 1 deletions

View File

@ -11,9 +11,9 @@ with nLib; {
../options.nix
../common/programs/core.nix
../common/programs/devel.nix
../common/programs/emacs.nix
../common/programs/terminal.nix
./programs/core.nix
./programs/emacs.nix
];
options = {
@ -50,5 +50,7 @@ with nLib; {
home.stateVersion = "22.05";
programs.home-manager.enable = true;
nathan.programs.emacs.package = lib.mkDefault pkgs.emacs28NativeComp;
# Allow management of launchd agents
launchd.enable = true;
};
}

View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, inputs, ... }:
{
imports = [ ../../common/programs/emacs.nix ];
config = lib.mkIf config.nathan.programs.emacs.enable {
# Setup service
launchd.agents.emacs = {
enable = true;
config = {
ProgramArguments =
[ "/etc/profiles/per-user/nathan/bin/emacs" "--daemon" ];
ProcessType = "Interactive";
RunAtLoad = true;
};
};
};
}