add emacsType and this should work now

This commit is contained in:
Sakooooo 2024-02-14 20:29:22 +04:00
parent b36af608e3
commit 048bf80a6d
Signed by: sako
GPG key ID: FE52FD65B76E4751
2 changed files with 6 additions and 4 deletions

View file

@ -121,7 +121,7 @@
emacs = { emacs = {
enable = true; enable = true;
daemon = false; daemon = false;
type = "unstable-pgtk"; type = "pkgs.emacs-unstable-pgtk";
}; };
}; };
cc.enable = true; cc.enable = true;

View file

@ -12,7 +12,7 @@ with lib; let
myEmacs = pkgs.emacsWithPackagesFromUsePackage { myEmacs = pkgs.emacsWithPackagesFromUsePackage {
config = ../../../../config/emacs/emacs.org; config = ../../../../config/emacs/emacs.org;
package = "pkgs.emacs-" + cfg.type; package = cfg.type;
alwaysEnsure = true; alwaysEnsure = true;
alwaysTangle = true; alwaysTangle = true;
extraEmacsPackages = epkgs: [ extraEmacsPackages = epkgs: [
@ -22,13 +22,15 @@ with lib; let
epkgs.exwm epkgs.exwm
]; ];
}; };
emacsType = "pkgs.*";
in { in {
options.modules.dev.editors.emacs = { options.modules.dev.editors.emacs = {
enable = mkEnableOption false; enable = mkEnableOption false;
daemon = mkEnableOption true; daemon = mkEnableOption true;
type = mkOption { type = mkOption {
type = with types; str; type = emacsType;
default = "unstable"; default = "pkgs.emacs-unstable";
}; };
}; };