home: move emacs service to home config

This commit is contained in:
Antoine Martin 2021-04-19 15:42:27 +02:00
parent 1fa2bee372
commit 244d2111af
4 changed files with 21 additions and 5 deletions

View file

@ -1,6 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./emacs.nix
./x ./x
]; ];

19
home/emacs.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
{
options.my.home.emacs = with lib; {
enable = mkEnableOption "Emacs daemon configuration";
};
config = lib.mkIf config.my.home.emacs.enable {
services.emacs = {
enable = true;
# generate emacsclient desktop file
client.enable = true;
};
programs.emacs = {
enable = true;
package = pkgs.emacsPgtkGcc;
};
};
}

View file

@ -71,11 +71,6 @@ in
layout = "fr"; layout = "fr";
xkbVariant = "us"; xkbVariant = "us";
}; };
emacs = {
enable = true;
package = pkgs.emacsPgtkGcc;
};
}; };
sound.enable = true; sound.enable = true;

View file

@ -3,5 +3,6 @@
home-manager.users.alarsyo = { home-manager.users.alarsyo = {
# Keyboard settings & i3 settings # Keyboard settings & i3 settings
my.home.x.enable = true; my.home.x.enable = true;
my.home.emacs.enable = true;
}; };
} }