Skip to content

Commit

Permalink
dbus rollback to 1.14.0 due to dbus-next related error (see altdeskto…
Browse files Browse the repository at this point in the history
  • Loading branch information
archer-65 committed Oct 25, 2022
1 parent 677b495 commit 2b0190f
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 43 deletions.
29 changes: 29 additions & 0 deletions config/emacs/lisp/init-extra-modes.el
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,34 @@
:straight t
:mode "\\.json\\'")

;; (leaf rust-mode
;; :straight t
;; :mode "\\.rs\\'"
;; :config
;; (setq rust-format-on-save t)
;; :bind
;; (rust-mode-map ("C-c C-c" . rust-run))
;; :hook
;; (rust-mode-hook . prettify-symbols-mode))

(leaf rustic
:straight t
:mode "\\.rs\\'"
:bind (:rustic-mode-map
("M-j" . lsp-ui-imenu)
("M-?" . lsp-find-references)
("C-c C-c l" . flycheck-list-errors)
("C-c C-c a" . lsp-execute-code-action)
("C-c C-c r" . lsp-rename)
("C-c C-c q" . lsp-workspace-restart)
("C-c C-c Q" . lsp-workspace-shutdown)
("C-c C-c s" . lsp-rust-analyzer-status))
:config
;; uncomment for less flashiness
;; (setq lsp-eldoc-hook nil)
;; (setq lsp-enable-symbol-highlighting nil)
;; (setq lsp-signature-auto-activate nil)
(setq rustic-format-on-save t))

(provide 'init-extra-modes)
;;; init-extra-modes.el ends here
12 changes: 10 additions & 2 deletions config/emacs/lisp/init-lsp.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@
;;; Code:

(leaf lsp-mode
:commands lsp
:straight t
:commands lsp
;; :bind
;; (lsp-mode-map
;; ("<tab>" . company-indent-or-complete-common))
:init
(setq lsp-keymap-prefix "C-c l")

(defun archer/lsp-mode-setup-completion ()
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
'(orderless))) ;; Configure flex
:config
(add-to-list 'lsp-language-id-configuration '(nix-mode . "nix"))
(lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp"))
:major-modes '(nix-mode)
:server-id 'nix))
:custom
(lsp-completion-provider . :none)
:hook
(c-mode-hook . lsp)
(c++-mode-hook . lsp)
(java-mode-hook . lsp)
(nix-mode-hook . lsp)
(lsp-mode-hook . lsp-enable-which-key-integration))
(rustic-mode-hook . lsp)
(lsp-mode-hook . lsp-enable-which-key-integration)
(lsp-completion-mode . archer/lsp-mode-setup-completion))

(leaf lsp-ui
:straight t
Expand Down
114 changes: 83 additions & 31 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@

flake-utils.url = "github:numtide/flake-utils";

emacs-overlay.url =
"github:nix-community/emacs-overlay?rev=977b205ab9ce857f3440dff2a114a35bf2758c05";
# emacs-overlay.url =
# "github:nix-community/emacs-overlay?rev=977b205ab9ce857f3440dff2a114a35bf2758c05";

emacs-overlay = {
url = "github:jeslie0/emacs-overlay"; # This repository.
inputs.nixpkgs.url = "github:nixos/nixpkgs/301aada7a64812853f2e2634a530ef5d34505048";
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay?rev=92c3c295daea9e71578b2e4f0cbe9906013c1adc";
};

vinceliuice-grub-theme = {
url = "github:vinceliuice/grub2-themes";
Expand Down
1 change: 1 addition & 0 deletions home/configurations/mario@quietfrost/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
nix.enable = true;
java.enable = true;
js.enable = true;
rust.enable = true;
tex.enable = true;
};

Expand Down
1 change: 1 addition & 0 deletions home/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ inputs: {
"/dev/javascript" = import ./dev/js inputs;
"/dev/java" = import ./dev/java.nix inputs;
"/dev/nix-lang" = import ./dev/nix-lang.nix inputs;
"/dev/rust" = import ./dev/rust.nix inputs;
"/dev/tex" = import ./dev/tex.nix inputs;

"editors/android-studio" = import ./editors/android-studio.nix inputs;
Expand Down
21 changes: 21 additions & 0 deletions home/modules/dev/rust.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
_:
{ options, config, lib, pkgs, ... }:

with lib;
let cfg = config.user-modules.dev.rust;
in {
options.user-modules.dev.rust = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};

config = mkIf cfg.enable {
home.packages = with pkgs; [
rustup
rust-analyzer
];
};
}
2 changes: 1 addition & 1 deletion lib/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = (lib.attrValues self.overlays) ++ [ emacs-overlay.overlay ];
overlays = (lib.attrValues self.overlays) ++ [ emacs-overlay.overlays.default ];
};

baseHome = {
Expand Down
26 changes: 19 additions & 7 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@ in {
};
});

tdlib = super.tdlib.overrideAttrs (old: rec {
version = "1.8.7";
src = pkgs.fetchFromGitHub {
owner = "tdlib";
repo = "td";
rev = "a7a17b34b3c8fd3f7f6295f152746beb68f34d83";
sha256 = "sha256-Rv96dZPQruJlXoZaQQ8QWbjEdvYljE9XjDUfa2cCpig=";
# Not needed since 1.8.7 commit on nixpkgs
# tdlib = super.tdlib.overrideAttrs (old: rec {
# version = "1.8.7";
# src = pkgs.fetchFromGitHub {
# owner = "tdlib";
# repo = "td";
# rev = "a7a17b34b3c8fd3f7f6295f152746beb68f34d83";
# sha256 = "sha256-Rv96dZPQruJlXoZaQQ8QWbjEdvYljE9XjDUfa2cCpig=";
# };
# });

# See https://github.com/NixOS/nixpkgs/issues/197408
# and https://github.com/altdesktop/python-dbus-next/issues/135
dbus = super.dbus.overrideAttrs (old: rec {
version = "1.14.0";

src = pkgs.fetchurl {
url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.xz";
sha256 = "sha256-zNfM43WW4KGVWP1mSNEnKrQ/AR2AyGNa6o/QutWK69Q=";
};
});
}

0 comments on commit 2b0190f

Please sign in to comment.