Packages build!
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
{ lib, config, pkgs, azos-utils, outputs, ... }:
|
||||
let
|
||||
isEnabled =
|
||||
config.azos.emacs.enable && config.azos.suites.base.enable;
|
||||
emacspkgs = config.azos.emacs.emacspkg.pkgs;
|
||||
localPkgName = "azos-emacs-base";
|
||||
in
|
||||
{
|
||||
options.azos.emacs.enable = (azos-utils.mkFeatureEnableOption {
|
||||
description = "Enables EMACS installation.";});
|
||||
|
||||
options.azos.emacs.emacspkg = lib.mkOption{
|
||||
type = lib.types.package;
|
||||
default = pkgs.emacs;
|
||||
description = "The base package to use for Emacs.";
|
||||
};
|
||||
|
||||
options.azos.emacs.pkgs = lib.mkOption{
|
||||
default = [];
|
||||
description = "List of packages for Emacs.";
|
||||
};
|
||||
|
||||
options.azos.emacs.enabledSuites = lib.mkOption{
|
||||
default = [];
|
||||
description = "List of enabled suite names for Emacs. Used to enable the " +
|
||||
"custom packages in init.el.";
|
||||
};
|
||||
|
||||
#Set config
|
||||
config = lib.mkIf isEnabled {
|
||||
#Base emacs suite definition
|
||||
azos.emacs.pkgs = [pkgs.azos.emacs.base];
|
||||
|
||||
azos.emacs.enabledSuites = [localPkgName];
|
||||
|
||||
#Global instantiation of Emacs
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package =
|
||||
((pkgs.emacsPackagesFor config.azos.emacs.emacspkg).emacsWithPackages (
|
||||
config.azos.emacs.pkgs
|
||||
));
|
||||
extraConfig = lib.strings.concatStringsSep "\n"
|
||||
(builtins.map (s : "(require '" + s + ")\n")
|
||||
config.azos.emacs.enabledSuites);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# imports = [./vterm.nix];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#+title: Aner's Emacs Vterm Configuration
|
||||
#+property: header-args :results silent
|
||||
|
||||
* Vterm
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'azos-emacs-base)
|
||||
|
||||
(use-package vterm
|
||||
:if (member system-type '(gnu gnu/linux))
|
||||
:config
|
||||
(add-hook 'vterm-mode-hook
|
||||
(lambda () (setq-local global-hl-line-mode nil)))
|
||||
|
||||
(evil-collection-define-key 'normal 'vterm-mode-map
|
||||
(kbd "p") 'vterm-yank)
|
||||
(setq vterm-timer-delay 0.01
|
||||
vterm-term-environment-variable "xterm-256color"))
|
||||
#+end_src
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{ lib, config, pkgs, azos-utils, ... }:
|
||||
let
|
||||
isEnabled =
|
||||
config.azos.emacs.enable && config.azos.suites.editor.enable &&
|
||||
config.azos.emacs.vterm.enable;
|
||||
emacspkgs = config.azos.emacs.emacspkg.pkgs;
|
||||
localPkgName = "azos-emacs-vterm";
|
||||
in
|
||||
{
|
||||
options.azos.emacs.vterm.enable = (azos-utils.mkFeatureEnableOption {
|
||||
description = "Enables Emacs VTERM installation.";});
|
||||
|
||||
#Set config
|
||||
config = lib.mkIf isEnabled {
|
||||
|
||||
#Base emacs suite definition
|
||||
azos.emacs.pkgs = [(emacspkgs.trivialBuild (azos-utils.trivialFromOrg {
|
||||
pname = localPkgName;
|
||||
version = "0.1.6";
|
||||
src = ./el/azos-emacs-vterm.org;
|
||||
packageRequires = with emacspkgs; [
|
||||
vterm
|
||||
];
|
||||
}))];
|
||||
|
||||
azos.emacs.enabledSuites = [localPkgName];
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user