From 59bbc4c23966fd842c46924b9efd424fd83c17cc Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Tue, 30 Mar 2021 14:05:31 +0300 Subject: [PATCH] Add crdt --- flake.lock | 17 +++++++++++++++++ flake.nix | 4 ++++ modules/applications/emacs/default.nix | 17 +++++++++++++++-- modules/applications/emacs/init.el | 2 ++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 2e51345..fdee9b3 100644 --- a/flake.lock +++ b/flake.lock @@ -49,6 +49,22 @@ "type": "github" } }, + "crdt": { + "flake": false, + "locked": { + "lastModified": 1613110836, + "narHash": "sha256-i37FEsWPFgowMogUFwdu2iOBXS3rvNFh7w8cEhyERkk=", + "ref": "master", + "rev": "3a2424afa91e2205a18af68972537df8695e7c06", + "revCount": 69, + "type": "git", + "url": "https://code.librehq.com/qhong/crdt.el" + }, + "original": { + "type": "git", + "url": "https://code.librehq.com/qhong/crdt.el" + } + }, "deploy-rs": { "inputs": { "flake-compat": "flake-compat", @@ -399,6 +415,7 @@ "inputs": { "NUR": "NUR", "base16-unclaimed-schemes": "base16-unclaimed-schemes", + "crdt": "crdt", "deploy-rs": "deploy-rs", "emacs-overlay": "emacs-overlay", "flake-compat": "flake-compat_2", diff --git a/flake.nix b/flake.nix index f5030f7..e5320e3 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,10 @@ url = "github:AlexxIT/SonoffLAN"; flake = false; }; + crdt = { + url = "git+https://code.librehq.com/qhong/crdt.el"; + flake = false; + }; }; outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: { diff --git a/modules/applications/emacs/default.nix b/modules/applications/emacs/default.nix index bac3e72..4fe822c 100644 --- a/modules/applications/emacs/default.nix +++ b/modules/applications/emacs/default.nix @@ -1,4 +1,16 @@ -{ pkgs, config, lib, ... }: { +{ pkgs, config, lib, inputs, ... }: +let + emacs = pkgs.emacsPgtk; + crdt = (pkgs.emacsPackagesNgFor emacs).trivialBuild { + pname = "crdt"; + version = "0.0.0"; + phases = [ "buildPhase" "installPhase" ]; + buildPhase = '' + cp ${inputs.crdt}/*.el . + ''; + }; +in +{ # secrets-envsubst.emacs = { # owner = "balsoft:users"; # directory = "emacs"; @@ -7,7 +19,7 @@ home-manager.users.balsoft = { programs.emacs = { enable = true; - package = pkgs.emacsPgtk; + package = emacs; extraPackages = epkgs: with epkgs; [ use-package @@ -57,6 +69,7 @@ org-caldav envrc lsp-haskell + crdt ]; }; diff --git a/modules/applications/emacs/init.el b/modules/applications/emacs/init.el index 6a5e704..db9dc95 100755 --- a/modules/applications/emacs/init.el +++ b/modules/applications/emacs/init.el @@ -240,5 +240,7 @@ If point was already at that position, move point to beginning of line." (envrc-global-mode) (advice-add 'lsp :before (lambda (&optional n) (envrc--update)))) +(use-package crdt) + (load-theme 'manoj-dark t) ;;; init.el ends here