From 2209a9c6d89aacc97ada36bad661547affd44e82 Mon Sep 17 00:00:00 2001 From: luqmanishere Date: Sun, 5 May 2024 18:47:19 +0800 Subject: [PATCH] update configs --- .gitignore | 2 ++ home/default.nix | 1 + home/editors/emacs/default.nix | 6 +++++ home/editors/emacs/init.el | 29 +++++++++++++++++++------ home/editors/emacs/lisp/init-keymaps.el | 6 +++-- home/editors/emacs/lisp/init-lsp.el | 7 +++++- home/editors/vscode.nix | 8 +++++++ home/wayland-shell/hyprland/default.nix | 4 +++- systems/asuna/default.nix | 6 +++-- 9 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 home/editors/vscode.nix diff --git a/.gitignore b/.gitignore index cb0b2ab..b7eac1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .direnv .devenv /result +projectile-bookmarks.eld +recentf diff --git a/home/default.nix b/home/default.nix index a9e6763..5546263 100644 --- a/home/default.nix +++ b/home/default.nix @@ -52,6 +52,7 @@ self.homeModules.misc-gui ./editors/emacs + ./editors/vscode.nix ]; }; diff --git a/home/editors/emacs/default.nix b/home/editors/emacs/default.nix index 0855812..64fd0cc 100644 --- a/home/editors/emacs/default.nix +++ b/home/editors/emacs/default.nix @@ -14,5 +14,11 @@ services.emacs.enable = true; services.emacs.package = emacs-pkg; + + home.file = { + ".emacs.d/init.el".source = ./init.el; + ".emacs.d/early-init.el".source = ./early-init.el; + ".emacs.d/lisp".source = ./lisp; + }; }; } diff --git a/home/editors/emacs/init.el b/home/editors/emacs/init.el index b0bd60e..0fb112a 100644 --- a/home/editors/emacs/init.el +++ b/home/editors/emacs/init.el @@ -1,8 +1,12 @@ +;;; Init --- SolemnAttic's Emacs config +;;; Commentary: These lines are here because flymake is complaining about them +;;; not being here +;;; -*- lexical-binding: t; -*-. ;; this opening portion is taken from centaur emacs (when (version< emacs-version "27.1") (error "Emacs 27.1 and above required!")) -;; delay the gc +;; delay the gc (setq gc-cons-threshold most-positive-fixnum) ;; dont show the default mode line @@ -42,7 +46,10 @@ Otherwise the startup will be very slow." (update-load-path) ;; end of centaur emacs stuff in init +;; i dont need these warnings hahah +(setq custom-safe-themes t) +;; just Suppress these (setq inhibit-startup-message t) (scroll-bar-mode -1) ; Disable visible scrollbar @@ -69,6 +76,8 @@ Otherwise the startup will be very slow." ;; Initialize package sources (require 'package) +(setq package-user-dir "~/.emacs.d/packages") + (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/") ("elpa" . "https://elpa.gnu.org/packages/"))) @@ -236,6 +245,17 @@ Otherwise the startup will be very slow." :config (add-hook 'after-init-hook #'global-flycheck-mode)) +(use-package centaur-tabs + :demand + :config + (centaur-tabs-mode t) + :bind + ("C-c h". centaur-tabs-backward) + ("C-c l" . centaur-tabs-forward)) + +(use-package tree-sitter) +(use-package tree-sitter-langs) + (require 'init-lsp) (use-package rustic :init @@ -256,12 +276,7 @@ Otherwise the startup will be very slow." '("8c7e832be864674c220f9a9361c851917a93f921fedb7717b1b5ece47690c098" "e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2" default)) - '(package-selected-packages - '(command-log-mode counsel dap-mode dashboard doom-modeline - doom-themes embark-consult flycheck helpful - ivy-rich key-chord lsp-mode lsp-ui marginalia - meow orderless projectile rainbow-delimiters - smartparens vertico which-key))) + '(package-selected-packages nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/home/editors/emacs/lisp/init-keymaps.el b/home/editors/emacs/lisp/init-keymaps.el index a2238ae..e41bc65 100644 --- a/home/editors/emacs/lisp/init-keymaps.el +++ b/home/editors/emacs/lisp/init-keymaps.el @@ -1,5 +1,6 @@ +;;; lexical-binding: t (defun meow-setup () - "Setup meow binds" + "Setup meow binds." (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) (meow-motion-overwrite-define-key '("j" . meow-next) @@ -83,7 +84,7 @@ '("Y" . meow-sync-grab) '("z" . meow-pop-selection) '("'" . repeat) - '("" . ignore))) + '("" . ignore))) (use-package meow :config @@ -100,3 +101,4 @@ (key-chord-define meow-insert-state-keymap "kj" 'meow-insert-exit)) (provide 'init-keymaps) +;;; init-keymaps.el ends here diff --git a/home/editors/emacs/lisp/init-lsp.el b/home/editors/emacs/lisp/init-lsp.el index 2e019bb..a87f924 100644 --- a/home/editors/emacs/lisp/init-lsp.el +++ b/home/editors/emacs/lisp/init-lsp.el @@ -1,11 +1,16 @@ +;;; lexical-binding: t (use-package lsp-mode :init ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") (setq lsp-keymap-prefix "C-c l") :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode) - (XXX-mode . lsp) + (rustic-mode . lsp) ;; if you want which-key integration (lsp-mode . lsp-enable-which-key-integration)) + :init + (setq lsp-inlay-hint-enable t) + :config + (lsp-inlay-hints-mode) :commands lsp) ;; optionally diff --git a/home/editors/vscode.nix b/home/editors/vscode.nix new file mode 100644 index 0000000..f029690 --- /dev/null +++ b/home/editors/vscode.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + config = { + programs.vscode = { + enable = true; + package = pkgs.vscode; + }; + }; +} diff --git a/home/wayland-shell/hyprland/default.nix b/home/wayland-shell/hyprland/default.nix index bc2839d..b2dfceb 100644 --- a/home/wayland-shell/hyprland/default.nix +++ b/home/wayland-shell/hyprland/default.nix @@ -148,6 +148,8 @@ in { "opaque, title:(muzik)" "float, class:(ayaya-project-manager)" "opaque, class:(ayaya-project-manager)" + "float, class:(Ayaya-project-manager)" + "opaque, class:(Ayaya-project-manager)" "float, title:(Extension: (Raindrop.io) - Bookmark saved — Mozilla Firefox)" "animation slide, class:(pavucontrol)" @@ -216,7 +218,7 @@ in { "SUPERSHIFT, N, exec, killall -SIGUSR1 waybar" # waybar hide "SUPERSHIFT, L, exec, loginctl lock-session && sleep 5 && hyprctl dispatch dpms off" - "SUPERSHIFT, S, exec, ${lib.getExe pkgs.grim} -g ${lib.getExe pkgs.slurp} " + "SUPERSHIFT, S, exec, grim -g \"\$(${lib.getExe pkgs.slurp})\" " # FIXME: WTH IS THIS? "SUPER, T, exec, /home/luqman/scripts/autoclicktrigger.sh" diff --git a/systems/asuna/default.nix b/systems/asuna/default.nix index 794815e..4feee7f 100644 --- a/systems/asuna/default.nix +++ b/systems/asuna/default.nix @@ -216,6 +216,8 @@ in { # TODO: refactor into own module console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + # TODO: wth do i do with this? environment.systemPackages = with pkgs; [ wayland @@ -270,8 +272,8 @@ in { }; virtualisation = { - waydroid.enable = false; - lxd.enable = false; + waydroid.enable = true; + lxd.enable = true; podman = { enable = true; defaultNetwork.settings.dns_enabled = true;