From 244d2111afc955bb2f368d3c6604bb13b0e10464 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 19 Apr 2021 15:42:27 +0200 Subject: [PATCH] home: move emacs service to home config --- home/default.nix | 1 + home/emacs.nix | 19 +++++++++++++++++++ hosts/boreal/default.nix | 5 ----- hosts/boreal/home.nix | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 home/emacs.nix diff --git a/home/default.nix b/home/default.nix index 1cb28cb..c9a4a7e 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./emacs.nix ./x ]; diff --git a/home/emacs.nix b/home/emacs.nix new file mode 100644 index 0000000..7229282 --- /dev/null +++ b/home/emacs.nix @@ -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; + }; + }; +} diff --git a/hosts/boreal/default.nix b/hosts/boreal/default.nix index 347132a..f2b13f4 100644 --- a/hosts/boreal/default.nix +++ b/hosts/boreal/default.nix @@ -71,11 +71,6 @@ in layout = "fr"; xkbVariant = "us"; }; - - emacs = { - enable = true; - package = pkgs.emacsPgtkGcc; - }; }; sound.enable = true; diff --git a/hosts/boreal/home.nix b/hosts/boreal/home.nix index fe3fea0..46f1750 100644 --- a/hosts/boreal/home.nix +++ b/hosts/boreal/home.nix @@ -3,5 +3,6 @@ home-manager.users.alarsyo = { # Keyboard settings & i3 settings my.home.x.enable = true; + my.home.emacs.enable = true; }; }