mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-18 22:55:52 +05:30
Added emacs eaf to my flake!
This commit is contained in:
parent
ae90cd0d8a
commit
8b3fb0123c
34
flake.lock
34
flake.lock
|
@ -54,6 +54,38 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"eaf": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684236422,
|
||||
"narHash": "sha256-csmx8X/06rzFXcsUrH79Ha1V7SmdztiMEzQ75DW0CYo=",
|
||||
"owner": "emacs-eaf",
|
||||
"repo": "emacs-application-framework",
|
||||
"rev": "6a9fa4cc6ce2878b9585f5a5a34f6b0b9693fe6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "emacs-eaf",
|
||||
"repo": "emacs-application-framework",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"eaf-browser": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1683381393,
|
||||
"narHash": "sha256-eZnSFyhN6/C/jV1+oaKOu3hunetJPNPFhzsnEkz7pYA=",
|
||||
"owner": "emacs-eaf",
|
||||
"repo": "eaf-browser",
|
||||
"rev": "0edb767209255732099cd38967e2fb0f0eefd314",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "emacs-eaf",
|
||||
"repo": "eaf-browser",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"emacs-overlay": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -495,6 +527,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"eaf": "eaf",
|
||||
"eaf-browser": "eaf-browser",
|
||||
"home-manager": "home-manager",
|
||||
"nix-doom-emacs": "nix-doom-emacs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -7,9 +7,17 @@
|
|||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
|
||||
stylix.url = "github:danth/stylix";
|
||||
eaf = {
|
||||
url = "github:emacs-eaf/emacs-application-framework";
|
||||
flake = false;
|
||||
};
|
||||
eaf-browser = {
|
||||
url = "github:emacs-eaf/eaf-browser";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, ... }:
|
||||
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
name = "emmet";
|
||||
|
@ -41,6 +49,8 @@
|
|||
myNixConfigurationFilePath = dotfilesDir+"/system/configuration.nix";
|
||||
myHomeManagerFilePath = dotfilesDir+"/user/home.nix";
|
||||
myTheme = theme;
|
||||
inherit (inputs) eaf;
|
||||
inherit (inputs) eaf-browser;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -935,3 +935,31 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
|
|||
(add-to-list 'focus-mode-to-thing '(lisp-mode . paragraph))
|
||||
|
||||
;(add-hook 'org-mode-hook #'focus-mode)
|
||||
|
||||
;;;-- Load emacs application framework;;;--
|
||||
(use-package! eaf
|
||||
:load-path "~/.emacs.d/eaf/"
|
||||
:init
|
||||
:custom
|
||||
(eaf-browser-continue-where-left-off t)
|
||||
(eaf-browser-enable-adblocker t)
|
||||
(browse-url-browser-function 'eaf-open-browser) ;; Make EAF Browser my default browser
|
||||
:config
|
||||
(defalias 'browse-web #'eaf-open-browser)
|
||||
|
||||
(require 'eaf-browser)
|
||||
|
||||
(require 'eaf-evil)
|
||||
(define-key key-translation-map (kbd "SPC")
|
||||
(lambda (prompt)
|
||||
(if (derived-mode-p 'eaf-mode)
|
||||
(pcase eaf--buffer-app-name
|
||||
("browser" (if (string= (eaf-call-sync "eval_function" eaf--buffer-id "is_focus") "True")
|
||||
(kbd "SPC")
|
||||
(kbd eaf-evil-leader-key)))
|
||||
(_ (kbd "SPC")))
|
||||
(kbd "SPC")))))
|
||||
|
||||
(map! :leader
|
||||
:desc "Open web browser"
|
||||
"o w" #'eaf-open-browser-with-history)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, eaf, eaf-browser, ... }:
|
||||
|
||||
{
|
||||
programs.doom-emacs = {
|
||||
|
@ -9,4 +9,31 @@
|
|||
template = builtins.readFile ./themes/doom-stylix-theme.el.mustache;
|
||||
extension = ".el";
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
nodejs
|
||||
wmctrl
|
||||
jshon
|
||||
aria
|
||||
(python3.withPackages (p: with p; [
|
||||
pandas
|
||||
requests
|
||||
pyqt6 sip qtpy qt6.qtwebengine epc lxml pyqt6-webengine
|
||||
pysocks
|
||||
pymupdf
|
||||
markdown
|
||||
]))];
|
||||
home.file.".emacs.d/eaf" = {
|
||||
source = "${eaf}";
|
||||
recursive = true;
|
||||
};
|
||||
home.file.".emacs.d/eaf/app/browser" = {
|
||||
source = "${eaf-browser}";
|
||||
recursive = true;
|
||||
onChange = "
|
||||
pushd ~/.emacs.d/eaf/app/browser;
|
||||
npm install darkreader @mozilla/readability;
|
||||
popd;
|
||||
";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1303,10 +1303,10 @@ I don't have this active right now since I'm exploring tab-bar mode instead!
|
|||
|
||||
#+END_SRC
|
||||
** EAF
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;;;-- Load emacs application framework;;;--
|
||||
(use-package! eaf
|
||||
:load-path "~/.local/bin/emacs-application-framework/"
|
||||
:load-path "~/.emacs.d/eaf/"
|
||||
:init
|
||||
:custom
|
||||
(eaf-browser-continue-where-left-off t)
|
||||
|
@ -1315,7 +1315,6 @@ I don't have this active right now since I'm exploring tab-bar mode instead!
|
|||
:config
|
||||
(defalias 'browse-web #'eaf-open-browser)
|
||||
|
||||
(require 'eaf-pdf-viewer)
|
||||
(require 'eaf-browser)
|
||||
|
||||
(require 'eaf-evil)
|
||||
|
@ -1326,8 +1325,6 @@ I don't have this active right now since I'm exploring tab-bar mode instead!
|
|||
("browser" (if (string= (eaf-call-sync "eval_function" eaf--buffer-id "is_focus") "True")
|
||||
(kbd "SPC")
|
||||
(kbd eaf-evil-leader-key)))
|
||||
("pdf-viewer" (kbd eaf-evil-leader-key))
|
||||
("image-viewer" (kbd eaf-evil-leader-key))
|
||||
(_ (kbd "SPC")))
|
||||
(kbd "SPC")))))
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
./app/games/games.nix # Various videogame apps
|
||||
./style/stylix.nix # Styling and themes for my apps
|
||||
./lang/cc/cc.nix # C and C++ tools
|
||||
./lang/python/python.nix # Python
|
||||
#./lang/python/python.nix # Python
|
||||
#./lang/python/python-packages.nix # Extra Python packages I want
|
||||
./lang/haskell/haskell.nix # Haskell tools
|
||||
#./lang/android/android.nix # Android developement
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
# Python packages
|
||||
home.packages = with pkgs.python310Packages; [
|
||||
home.packages = with pkgs.python3Packages; [
|
||||
cffi
|
||||
dbus-python
|
||||
wheel
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
home.packages = with pkgs; [
|
||||
# Python setup
|
||||
python310Full
|
||||
python3Full
|
||||
imath
|
||||
pystring
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue