From 8a6c09cd61775afe1d76b54b8d91cf29a8ec40f6 Mon Sep 17 00:00:00 2001 From: Emmet Date: Thu, 8 Aug 2024 08:03:37 -0500 Subject: [PATCH 1/3] Crdt use tls --- user/app/doom-emacs/config.el | 8 ++++++-- user/app/doom-emacs/doom.org | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index f37c8d6..21c37a8 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -653,7 +653,8 @@ If the path from LINK does not exist, nil is returned." ) (require 'crdt) -(setq crdt-default-tls nil) +(setq crdt-default-tls t) +(setq crdt-use-stunnel t) (setq crdt-default-name "Emmet") (if (file-exists-p "~/.emacs.d/crdt-private.el") (load! "~/.emacs.d/crdt-private.el")) (defun crdt-connect-default () @@ -676,9 +677,12 @@ If the path from LINK does not exist, nil is returned." :desc "Add buffer to a session" "a" #'crdt-share-buffer - :desc "Stop sharing buffer to session" + :desc "Stop sharing buffer when running a server" "s" #'crdt-stop-share-buffer + :desc "Run M-x on the (remote) crdt session" + "x" #'crdt-M-x + :desc "List crdt buffers in a session" "l" #'crdt-list-buffers diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index a847f48..e45a1da 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -786,7 +786,8 @@ exit *** Crdt #+begin_src emacs-lisp :tangle config.el (require 'crdt) -(setq crdt-default-tls nil) +(setq crdt-default-tls t) +(setq crdt-use-stunnel t) (setq crdt-default-name "Emmet") (if (file-exists-p "~/.emacs.d/crdt-private.el") (load! "~/.emacs.d/crdt-private.el")) (defun crdt-connect-default () @@ -809,9 +810,11 @@ exit :desc "Add buffer to a session" "a" #'crdt-share-buffer - :desc "Stop sharing buffer to session" + :desc "Stop sharing buffer when running a server" "s" #'crdt-stop-share-buffer + :desc "Run M-x on the (remote) crdt session" + "x" #'crdt-M-x :desc "List crdt buffers in a session" "l" #'crdt-list-buffers From 21a35c436b075553abb40b8638bddbd8de9bc962 Mon Sep 17 00:00:00 2001 From: Emmet Date: Thu, 8 Aug 2024 08:04:37 -0500 Subject: [PATCH 2/3] Some random emacs fixes + added kotlin lang server --- user/app/doom-emacs/config.el | 3 +++ user/app/doom-emacs/doom.nix | 6 +++++- user/app/doom-emacs/doom.org | 14 ++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index 21c37a8..b7fa639 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -1,6 +1,7 @@ ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;;;------ User configuration ------;;; +(setq use-package-always-defer t) ;; Import relevant system variables from flake (see doom.nix) ;; includes variables like user-full-name, user-username, user-home-directory, user-email-address, doom-font, @@ -1551,6 +1552,8 @@ If the path from LINK does not exist, nil is returned." orig-result))) (advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command) +(map! :leader :desc "Find definition using lsp" "L d" #'lsp-find-definition) + (add-to-list 'tramp-remote-path 'tramp-own-remote-path) (after! vterm (add-to-list 'vterm-tramp-shells '("ssh" "zsh")) ;; I use zsh on all my servers diff --git a/user/app/doom-emacs/doom.nix b/user/app/doom-emacs/doom.nix index a07b00f..41840f7 100644 --- a/user/app/doom-emacs/doom.nix +++ b/user/app/doom-emacs/doom.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }: +{ config, lib, pkgs, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".webp"; @@ -50,6 +50,7 @@ in emacs-lsp-booster nil nixfmt + kotlin-language-server file wmctrl jshon @@ -71,6 +72,9 @@ in ]) ++ (with pkgs-stable; [ nodejs nodePackages.mermaid-cli + ]) ++ (with pkgs; [ + openssl + stunnel ]); services.mbsync = { diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index e45a1da..b9308fe 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -64,6 +64,7 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;;;------ User configuration ------;;; +(setq use-package-always-defer t) ;; Import relevant system variables from flake (see doom.nix) ;; includes variables like user-full-name, user-username, user-home-directory, user-email-address, doom-font, @@ -815,12 +816,14 @@ exit :desc "Run M-x on the (remote) crdt session" "x" #'crdt-M-x + :desc "List crdt buffers in a session" "l" #'crdt-list-buffers :desc "List crdt users in a session" "u" #'crdt-list-users ) + #+end_src ** Org Roam Configuration *** Standard Org Roam Configuration @@ -1574,7 +1577,7 @@ I don't have this active right now since it's kinda weird with pgtk... (evil-global-set-key 'normal (kbd "C-w") 'tab-bar-close-tab) (evil-global-set-key 'normal (kbd "C-t") 'tab-bar-new-tab) -(setq tab-bar-new-tab-choice "*doom*") +(setq tab-bar-new-tab-choice "*dashboard*") (tab-bar-mode t) @@ -1822,6 +1825,9 @@ I don't have this active right now since it's kinda weird with pgtk... orig-result))) (advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command) +(map! :leader :desc "Find definition using lsp" "L d" #'lsp-find-definition) + + #+END_SRC ** Terminal #+BEGIN_SRC emacs-lisp :tangle config.el @@ -2117,7 +2123,7 @@ Any git package can be configured for a particular commit or branch: * Nix Integration In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]]. #+BEGIN_SRC nix :tangle doom.nix -{ config, lib, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }: +{ config, lib, pkgs, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".webp"; @@ -2169,6 +2175,7 @@ in emacs-lsp-booster nil nixfmt + kotlin-language-server file wmctrl jshon @@ -2190,6 +2197,9 @@ in ]) ++ (with pkgs-stable; [ nodejs nodePackages.mermaid-cli + ]) ++ (with pkgs; [ + openssl + stunnel ]); services.mbsync = { From fa80a8102cda665f0c6d6df78b479b3356610de6 Mon Sep 17 00:00:00 2001 From: Emmet Date: Thu, 8 Aug 2024 13:43:11 -0500 Subject: [PATCH 3/3] Updated system --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 97c182f..a8a6615 100644 --- a/flake.lock +++ b/flake.lock @@ -117,11 +117,11 @@ "blocklist-hosts": { "flake": false, "locked": { - "lastModified": 1721522228, - "narHash": "sha256-qM7pLw81jjPh8IWAHO8KguwSKrU/97g9aMtIvmsh8SA=", + "lastModified": 1722815760, + "narHash": "sha256-BsAKFrj6Js8QY2j/bdydhS0DhJwfHSnLRZjaK9pLy8w=", "owner": "StevenBlack", "repo": "hosts", - "rev": "2eaa823eac9129bade167cf89549829b1e11bddb", + "rev": "8bb5a4f6e2a9f902f44623d1cdf533428bfa10b2", "type": "github" }, "original": { @@ -472,11 +472,11 @@ ] }, "locked": { - "lastModified": 1721996913, - "narHash": "sha256-eqbhEBObarS6WsI0J1PVACQ8fXeq9OmSS0+iXBegoOI=", + "lastModified": 1723015306, + "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", "owner": "nix-community", "repo": "home-manager", - "rev": "bc2b96acda50229bc99925dde5c8e561e90b0b00", + "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", "type": "github" }, "original": { @@ -899,11 +899,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1721924956, - "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", + "lastModified": 1722813957, + "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ad6a14c6bf098e98800b091668718c336effc95", + "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", "type": "github" }, "original": { @@ -946,11 +946,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1721949857, - "narHash": "sha256-DID446r8KsmJhbCzx4el8d9SnPiE8qa6+eEQOJ40vR0=", + "lastModified": 1722869614, + "narHash": "sha256-7ojM1KSk3mzutD7SkrdSflHXEujPvW1u7QuqWoTLXQU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1cc729dcbc31d9b0d11d86dc7436163548a9665", + "rev": "883180e6550c1723395a3a342f830bfc5c371f6b", "type": "github" }, "original": { @@ -1338,11 +1338,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1721960387, - "narHash": "sha256-o21ax+745ETGXrcgc/yUuLw1SI77ymp3xEpJt+w/kks=", + "lastModified": 1723083652, + "narHash": "sha256-ait+SeO67n8b3lIaBWwuzVX6F1zyTJ0cY6cHWtvhTyc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9cbf831c5b20a53354fc12758abd05966f9f1699", + "rev": "69e0ad9289fc08ee5a313fb107f00e0f21e7cbb2", "type": "github" }, "original": { @@ -1398,11 +1398,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1721989207, - "narHash": "sha256-APKQeMMdh1O1W3OnxEvNfHNBiE4eRvEN6rosFr2dLHE=", + "lastModified": 1722946882, + "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", "owner": "danth", "repo": "stylix", - "rev": "b9de20c76e8d5c13cf2304d23cf589803c311670", + "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", "type": "github" }, "original": {