Remove qutebrowser, update deps, and add clangd-in-nix to emacs

This commit is contained in:
Konstantin Nazarov 2024-04-10 13:10:23 +01:00
parent 7b0b9e2bae
commit 9b210469ed
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
3 changed files with 35 additions and 65 deletions

View file

@ -120,7 +120,6 @@ in {
swaylock
swayidle
wl-clipboard
qutebrowser
keyd
tdesktop
git
@ -175,7 +174,7 @@ in {
#network-manager-applet
(clang-tools.override {
llvmPackages = llvmPackages_17;
enableLibcxx = true;
enableLibcxx = false;
}) # mainly for clang-format
# wget
my_python
@ -199,19 +198,6 @@ in {
# Enables wayland support in electron apps (e.g. slack)
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Set default browser to qutebrowser in electron apps
#environment.sessionVariables.DEFAULT_BROWSER =
#"${pkgs.qutebrowser}/bin/qutebrowser";
# Set default browser to qutebrowser everywhere else
#xdg.mime.defaultApplications = {
#"text/html" = "org.qutebrowser.qutebrowser.desktop";
#"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
#"x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop";
#"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
#"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
#};
# Enable screen sharing on Wayland
xdg = {
portal = {
@ -389,7 +375,7 @@ in {
services.pcscd.enable = true;
fonts.fontDir.enable = true;
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
dejavu_fonts
source-code-pro
font-awesome # for waybar indicators
@ -608,30 +594,6 @@ in {
};
};
};
programs.qutebrowser = {
enable = true;
searchEngines = {
DEFAULT = "https://kagi.com/search?q={}";
g = "https://www.google.com/search?hl=en&q={}";
};
#config.set('content.media.video_capture', True, 'https://www.meet.google.com')
settings = {
tabs.position = "left";
content.cookies.accept = "no-3rdparty";
};
extraConfig = ''
config.set('content.javascript.can_access_clipboard', True, 'amazon.com')
config.set('content.javascript.can_access_clipboard', True, 'awsapps.com')
config.set('content.media.audio_capture', True, 'https://meet.google.com')
config.set('content.media.video_capture', True, 'https://meet.google.com')
config.set('content.media.audio_video_capture', True, 'https://meet.google.com')
config.set('content.notifications.enabled', False, 'https://meet.google.com')
config.set('content.register_protocol_handler', False, 'https://calendar.google.com?cid=%25s')
'';
keyBindings = {
insert = { "<Shift+Ins>" = "insert-text -- {clipboard}"; };
};
};
programs.waybar = {
enable = true;
settings = [{

View file

@ -965,6 +965,14 @@ window, unless BACKGROUND (prefix-argument) is non-nil.
(if arg '(eldoc-display-in-buffer) '(eldoc-display-in-echo-area)))
(eldoc t)))
(defun nix-clangd (int)
(let ((curproj (project-current nil)))
(if (and curproj (file-exists-p (format "%s/flake.nix" (project-root curproj))))
(list "nix" "develop" (format "%s#" (project-root curproj)) "--command" "bash" "-c" "clangd")
(list "clangd")
))
)
(with-eval-after-load 'eglot
(add-hook
'eglot-managed-mode-hook
@ -977,12 +985,12 @@ window, unless BACKGROUND (prefix-argument) is non-nil.
;; (eldoc-mode -1)
))
(add-to-list 'eglot-server-programs
`(c++-mode . ("clangd")))
`(c++-mode . ,#'nix-clangd))
(add-to-list 'eglot-server-programs
`(c++-ts-mode . ("clangd")))
`(c++-ts-mode . ,#'nix-clangd))
(add-to-list 'eglot-server-programs
`(c-ts-mode . ("clangd"))
))
`(c-ts-mode . ,#'nix-clanngd))
)
(add-hook 'c++-mode-hook 'eglot-ensure)
(add-hook 'c++-ts-mode-hook 'eglot-ensure)

View file

@ -11,11 +11,11 @@
]
},
"locked": {
"lastModified": 1702399955,
"narHash": "sha256-FnB5O1RVFzj3h7Ayf7UxFnOL1gsJuG6gn1LCTd9dKFs=",
"lastModified": 1712108714,
"narHash": "sha256-QzrcwGuuAP1octIcUw/d+Yi5BEXYt1NOwNLpeUrqKTk=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "47798c4ab07d5f055bb2625010cf6d8e3f384923",
"rev": "5d0a10938c32f3cb95d1f1f18127948d239c6720",
"type": "github"
},
"original": {
@ -29,11 +29,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -69,11 +69,11 @@
]
},
"locked": {
"lastModified": 1706981411,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"lastModified": 1710888565,
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
"type": "github"
},
"original": {
@ -90,11 +90,11 @@
]
},
"locked": {
"lastModified": 1700377861,
"narHash": "sha256-pUW0qYLhA7fOQdGLWbblafbM3BQg25QhVZrGHm2qhyQ=",
"lastModified": 1712010798,
"narHash": "sha256-O9uEcFJiHAznkL6E2Bo5PuOGmdMVgi8IGIkksMn0zGo=",
"owner": "~knazarov",
"repo": "knazarov.com",
"rev": "500bdad7f81af15cf5532986f19777f15df43162",
"rev": "22e7a0e3cf10d2b3f08a94085ab2e98943dc7635",
"type": "sourcehut"
},
"original": {
@ -105,11 +105,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1707680347,
"narHash": "sha256-x4w2tsjOxclzz3Rdfq1H4z7J3AmaRey/aoNx1vbaB1o=",
"lastModified": 1712159163,
"narHash": "sha256-dOQAAr9adh00rlCg/eq6GwXo+pH0VC7RyE5uWzzAFLo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "749d596bfb5f54543f70e80f700e044d070870a2",
"rev": "67e2bc037137e4fdcf6b3132a4f54c165726500b",
"type": "github"
},
"original": {
@ -120,11 +120,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1707514827,
"narHash": "sha256-Y+wqFkvikpE1epCx57PsGw+M1hX5aY5q/xgk+ebDwxI=",
"lastModified": 1711668574,
"narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "20f65b86b6485decb43c5498780c223571dd56ef",
"rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
"type": "github"
},
"original": {
@ -198,11 +198,11 @@
]
},
"locked": {
"lastModified": 1702177193,
"narHash": "sha256-J2409SyXROoUHYXVy9h4Pj0VU8ReLuy/mzBc9iK4DBg=",
"lastModified": 1711855048,
"narHash": "sha256-HxegAPnQJSC4cbEbF4Iq3YTlFHZKLiNTk8147EbLdGg=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "d806e546f96c88cd9f7d91c1c19ebc99ba6277d9",
"rev": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10",
"type": "github"
},
"original": {