From 048bf80a6daea1742df37b2d8d9a81bd4496a569 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Wed, 14 Feb 2024 20:29:22 +0400 Subject: [PATCH] add emacsType and this should work now --- hosts/sakowsl/configuration.nix | 2 +- modules/dev/editors/emacs/default.nix | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/sakowsl/configuration.nix b/hosts/sakowsl/configuration.nix index 67d66248..939bda98 100644 --- a/hosts/sakowsl/configuration.nix +++ b/hosts/sakowsl/configuration.nix @@ -121,7 +121,7 @@ emacs = { enable = true; daemon = false; - type = "unstable-pgtk"; + type = "pkgs.emacs-unstable-pgtk"; }; }; cc.enable = true; diff --git a/modules/dev/editors/emacs/default.nix b/modules/dev/editors/emacs/default.nix index 1785a3c3..9978239c 100644 --- a/modules/dev/editors/emacs/default.nix +++ b/modules/dev/editors/emacs/default.nix @@ -12,7 +12,7 @@ with lib; let myEmacs = pkgs.emacsWithPackagesFromUsePackage { config = ../../../../config/emacs/emacs.org; - package = "pkgs.emacs-" + cfg.type; + package = cfg.type; alwaysEnsure = true; alwaysTangle = true; extraEmacsPackages = epkgs: [ @@ -22,13 +22,15 @@ with lib; let epkgs.exwm ]; }; + + emacsType = "pkgs.*"; in { options.modules.dev.editors.emacs = { enable = mkEnableOption false; daemon = mkEnableOption true; type = mkOption { - type = with types; str; - default = "unstable"; + type = emacsType; + default = "pkgs.emacs-unstable"; }; };