all repos — nixfiles @ 4177621ce4b79813e53000d499a95a8d51068610

System and user configuration, managed by nix and home-manager

darwin: remove config for emacs-macport easier to use upstream and reduce special cases

Alin
commit

4177621ce4b79813e53000d499a95a8d51068610

parent

cc699158cd67ffebbd142e961477b7d1791eae04

3 files changed, 16 insertions(+), 52 deletions(-)

changed files
M user/settings/darwin.nix → user/settings/darwin.nix
@@ -17,43 +17,17 @@ };
home.file.".hushlogin".text = ""; - programs.emacs = - let - useMacPort = false; - in - { - package = if useMacPort then pkgs.emacs-macport else pkgs.emacs; - extraPackages = ( - epkgs: - lib.lists.optionals useMacPort [ - epkgs.ultra-scroll - ] - ); - - extraConfig = '' - (with-eval-after-load 'dired - (setq insert-directory-program "gls" - dired-use-ls-dired t)) - '' - + ( - if useMacPort then - '' - (use-package ultra-scroll - :config (progn - (setq scroll-conservatively 3 - scroll-margin 0) - (ultra-scroll-mode +1))) - - '' - else - '' - (use-package pixel-scroll - :config (progn - (setq pixel-scroll-precision-use-momentum t) - (pixel-scroll-precision-mode 1))) - '' - ); - }; + programs.emacs = { + extraConfig = '' + (with-eval-after-load 'dired + (setq insert-directory-program "gls" + dired-use-ls-dired t)) + (use-package pixel-scroll + :config (progn + (setq pixel-scroll-precision-use-momentum t) + (pixel-scroll-precision-mode 1))) + ''; + }; programs.fish.plugins = map
M user/settings/emacs.nix → user/settings/emacs.nix
@@ -40,7 +40,7 @@ client.enable = true;
}; programs.emacs = { enable = true; - package = lib.mkDefault (if stdenv.isLinux then pkgs.emacs-gtk else pkgs.emacs-macport); + package = lib.mkDefault (if stdenv.isLinux then pkgs.emacs-gtk else pkgs.emacs); eshell = { aliases = {
M user/settings/emacs/theme.el → user/settings/emacs/theme.el
@@ -1,6 +1,4 @@
;; -*- lexical-binding: t; -*- -(setq is-macport (featurep 'term/mac-win)) - (use-package @package@ :if (or (daemonp) window-system))
@@ -25,13 +23,9 @@ (modify-all-frames-parameters `((ns-appearance ,mode))))
(defun my/system-appearance () (if (and (eq system-type 'darwin) - (if is-macport - (string-equal - "NSAppearanceNameDarkAqua" - (plist-get (mac-application-state) :appearance)) - (string-equal - "Dark" - (string-trim-right (shell-command-to-string "defaults read -g AppleInterfaceStyle"))))) + (string-equal + "Dark" + (string-trim-right (shell-command-to-string "defaults read -g AppleInterfaceStyle")))) 'dark 'light))
@@ -41,13 +35,9 @@ (my/switch-theme-variant (my/system-appearance)))
(my/switch-theme-variant (my/system-appearance)) - (add-hook 'mac-effective-appearance-change-hook - #'my/match-theme-system-appearance) - (use-package kqueue :if (and (eq system-type 'darwin) - window-system - (not (fboundp 'mac-application-state))) + window-system ) :config (progn (defun my/gp-notify-callback (event) (let* ((filename (elt event 2))