mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
launchd for gpg and emacs
This commit is contained in:
parent
e698956215
commit
2b6ec1955e
3 changed files with 35 additions and 4 deletions
3
home.nix
3
home.nix
|
@ -4,6 +4,7 @@ let homeDirectory = config.home.homeDirectory;
|
|||
in {
|
||||
imports = [
|
||||
./emacs.nix
|
||||
./launchd.nix
|
||||
./packages.nix
|
||||
./programs.nix
|
||||
];
|
||||
|
@ -31,5 +32,5 @@ in {
|
|||
variant = "colemak";
|
||||
};
|
||||
|
||||
home.sessionVariables = { EDITOR = "emacs"; };
|
||||
home.sessionVariables = { EDITOR = "emacsclient -c -nw"; };
|
||||
}
|
||||
|
|
28
launchd.nix
Normal file
28
launchd.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
launchd = {
|
||||
enable = true;
|
||||
|
||||
agents.emacs = {
|
||||
enable = true;
|
||||
config = {
|
||||
ProgramArguments = [ "${pkgs.emacs}/bin/emacs" "--fg-daemon" ];
|
||||
KeepAlive.SuccessfulExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
agents.gpg-daemon = {
|
||||
enable = true;
|
||||
config = {
|
||||
ProgramArguments = [
|
||||
"${pkgs.gnupg}/bin/gpg-agent"
|
||||
''
|
||||
--pinentry-program="${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac"''
|
||||
"--daemon"
|
||||
];
|
||||
KeepAlive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
gpg = {
|
||||
enable = true;
|
||||
package = pkgs.gnupg;
|
||||
settings = {
|
||||
use-agent = true;
|
||||
default-key = "860B5C62BF1FCE4272D26BF8C3DE5DF6198DACBD";
|
||||
|
@ -68,12 +69,13 @@
|
|||
ignoreDups = true;
|
||||
};
|
||||
shellAliases = {
|
||||
em = "emacsclient -c";
|
||||
emw = "emacsclient -c -nw";
|
||||
ew = "emacs -nw";
|
||||
em = "emacs";
|
||||
emw = "emacs -nw";
|
||||
ew = "emacsclient -c";
|
||||
e = "$EDITOR";
|
||||
np = "nix-shell -p";
|
||||
hms = "home-manager switch";
|
||||
cd = "z";
|
||||
};
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue