From d13815136b58872429c78aab41cc6d454a5f8d43 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Wed, 27 Apr 2022 01:16:54 +0530 Subject: [PATCH] regulatory updates home/natto/programs/emacs: update config to use org-babel and some other keybind related changes hosts/satori: misc changes modules/graphics: dont use the vulkan layer override for mesa Signed-off-by: Amneesh Singh --- README.org | 3 +- flake.lock | 150 +++++++++++------------------ flake.nix | 4 +- home/natto/config/emacs/config.org | 108 ++++++++++++++++----- home/natto/pkgs.nix | 22 ++++- home/natto/programs.nix | 6 +- hosts/satori/hardware.nix | 2 +- hosts/satori/pkgs.nix | 1 + hosts/satori/services.nix | 2 +- hosts/satori/stuff.nix | 2 +- modules/graphics.nix | 44 +++++---- overlays/overridesandshit.nix | 14 +-- 12 files changed, 204 insertions(+), 154 deletions(-) diff --git a/README.org b/README.org index c03e5e4..48ec82d 100644 --- a/README.org +++ b/README.org @@ -22,13 +22,12 @@ warning: │ └───x86_64-linux: omitted (use '--legacy' to show) Either do #+begin_src sh cd dotfiles -nixos-rebuild switch --flake .#Satori +nixos-rebuild switch --flake . #+end_src or #+begin_src sh nixos-rebuild switch --flake "git+https://git.weirdnatto.in/natto1784/dotfiles?ref=nixos" #+end_src -Replace ~Satori~ with whatever system you want or replace with whatever hostname you want in the config * How home-manager workey Just do diff --git a/flake.lock b/flake.lock index b31ed08..fd68f63 100644 --- a/flake.lock +++ b/flake.lock @@ -18,11 +18,11 @@ }, "emacs": { "locked": { - "lastModified": 1647914335, - "narHash": "sha256-6DcYfyQYb5chJkm3KPWvMTZrs1JtG4WMCtta1ocvlmg=", + "lastModified": 1650973913, + "narHash": "sha256-Fa+P0FZ/PcU953NBqnz41PnvObjDw0LaS1Vg4LTc2aA=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "023ce0b1e29732c6d26a380ad5dc8298c298f99b", + "rev": "5f258dfdab8e58abe2e44b78a3ccf262041f7b74", "type": "github" }, "original": { @@ -34,11 +34,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { @@ -63,21 +63,6 @@ } }, "flake-utils_2": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { "locked": { "lastModified": 1637014545, "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", @@ -97,11 +82,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1647903177, - "narHash": "sha256-9aWSpW/F8POA/7cuVpoqhVGfjAgcGRIinwxUaXmUpkk=", + "lastModified": 1650920743, + "narHash": "sha256-7xxdtLp295HswhyEjr991QJsBFeadUo43NiAsHnQ5+8=", "owner": "nix-community", "repo": "home-manager", - "rev": "80b4360678fa7890964ba8e40a722985bf8d107e", + "rev": "223a73c2ba7d358b23666937cb13a59b31df511c", "type": "github" }, "original": { @@ -115,11 +100,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1647175256, - "narHash": "sha256-7H+veXPM7IwdN1DoZqliwb9sghlN56koV5dnCu1kpsc=", + "lastModified": 1650841545, + "narHash": "sha256-AF3fk+p/mHbdtyrI3kpms+MoMVOdGIBGJ+7LT7WWdaU=", "owner": "nix-community", "repo": "home-manager", - "rev": "a8d00f5c038cf7ec54e7dac9c57b171c1217f008", + "rev": "236c6ec21420e44c38ec76de4fc3335bec1859b5", "type": "github" }, "original": { @@ -136,11 +121,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1646481600, - "narHash": "sha256-TBJu0BjWpp9737sqC5E4Iz48t3AatDUcBtXKuVJEQVg=", + "lastModified": 1650133068, + "narHash": "sha256-biHmW4DyRjydDUJ9bTqvUgVSSE/MzzAseQERT5yPjWI=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "75728d2686dec5ef2a73cdf80174311587413392", + "rev": "4ce864f52ae7e1733582a32d66c1f94ee11a52c8", "type": "gitlab" }, "original": { @@ -151,11 +136,11 @@ }, "master": { "locked": { - "lastModified": 1647935800, - "narHash": "sha256-RluNemNWfuwj0o4uPi1whjFSl0v/x+7aNi8mdPYaQro=", + "lastModified": 1651001537, + "narHash": "sha256-c8EkxI11BMjTIcs9f1gbLbPNeqXprFrZV6NSGQVxxRw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "74c1fd0b5ee7d2a0bf9754dd2bc0f41a73ed32a7", + "rev": "d67c3c89620e5785a5d8600a3aea94320f7bb56d", "type": "github" }, "original": { @@ -186,7 +171,7 @@ }, "neovim-flake": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": [ "nvim", "nixpkgs" @@ -194,11 +179,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1647877279, - "narHash": "sha256-uvQvyj0XS4pOIkpfApDaMFVWClmVpsTLQRQxvTJcBLA=", + "lastModified": 1650946819, + "narHash": "sha256-96tABVv1Dauk0FH7Dvk1ZXoabCyIpmx3oJUMLaiF9Ww=", "owner": "neovim", "repo": "neovim", - "rev": "0c02e8a62b1570be15db01d45969d2759a7f37bf", + "rev": "a75efc237d8669ef12fdfc9a7c5c5cf0f77083dc", "type": "github" }, "original": { @@ -210,15 +195,14 @@ }, "nix-gaming": { "inputs": { - "nixpkgs": "nixpkgs_5", - "utils": "utils_3" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1647879455, - "narHash": "sha256-BYZKNwl8DV+PRqLeCyY1ambhd4jxCAQeQSNG0dprtLY=", + "lastModified": 1650903776, + "narHash": "sha256-6OWA4R9trOSkmSdsJXslYlQ+VklCIOLpZKfNTtrXHNg=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "5258eb84d2b275f336a3b93026d406c8e1ebde04", + "rev": "448bce69b5713a3da870c77bbd6610e4c5fca2a8", "type": "github" }, "original": { @@ -229,11 +213,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1647350163, - "narHash": "sha256-OcMI+PFEHTONthXuEQNddt16Ml7qGvanL3x8QOl2Aao=", + "lastModified": 1648065016, + "narHash": "sha256-H1+uesSA0vsSWaPey5KbYdE+D67gXBJNk3Z/HE00M3M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3eb07eeafb52bcbf02ce800f032f18d666a9498d", + "rev": "c984213d12225fa5feb640136872da56d2e8f702", "type": "github" }, "original": { @@ -243,11 +227,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1647350163, - "narHash": "sha256-OcMI+PFEHTONthXuEQNddt16Ml7qGvanL3x8QOl2Aao=", + "lastModified": 1648065016, + "narHash": "sha256-H1+uesSA0vsSWaPey5KbYdE+D67gXBJNk3Z/HE00M3M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3eb07eeafb52bcbf02ce800f032f18d666a9498d", + "rev": "c984213d12225fa5feb640136872da56d2e8f702", "type": "github" }, "original": { @@ -287,11 +271,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1647734733, - "narHash": "sha256-LFYY+NhTgx++EtehrktrY4ZcsEIgd3+8dd1ZYb9NyQo=", + "lastModified": 1650899852, + "narHash": "sha256-FNgHYq0LtGhvq1CniCg1RaH9Ngr7svm9iR6loPWCCNs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b8f8b90b90ac713eb7f5cc7eb2100141ee29751d", + "rev": "ecc66a886eb7eec1d671ddfce2a0cccd12bc4807", "type": "github" }, "original": { @@ -302,11 +286,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1647350163, - "narHash": "sha256-OcMI+PFEHTONthXuEQNddt16Ml7qGvanL3x8QOl2Aao=", + "lastModified": 1650970888, + "narHash": "sha256-K0Qk6YbkyxBbszkBKCxsLA+jrQpaecf0X8iIO8frS48=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3eb07eeafb52bcbf02ce800f032f18d666a9498d", + "rev": "27a62a9c603d0d832141682cb4f34964d7b48ebb", "type": "github" }, "original": { @@ -318,11 +302,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1647800324, - "narHash": "sha256-rjwoxrk16zfrcO5Torh6CbAd5GHsHrXw+EwxOvh9AUI=", + "lastModified": 1650831523, + "narHash": "sha256-6pDZ08SAXsUx5rOP391x+TG39ENP/XA8VMa1tQvgEjc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9bc841fec1c0e8b9772afa29f934d2c7ce57da8e", + "rev": "87d34a6b8982e901b8e50096b8e79ebc0e66cda0", "type": "github" }, "original": { @@ -350,11 +334,11 @@ }, "nur": { "locked": { - "lastModified": 1647935829, - "narHash": "sha256-a255Dx1BygB18ZMeD72KAsm0mDqX8rCwZw6dlc/ngrc=", + "lastModified": 1650996920, + "narHash": "sha256-BkwCJRYkdQBfdr373bbr0aIukPilcIahWpLxRyz72oA=", "owner": "nix-community", "repo": "NUR", - "rev": "d96e19df518dd14a873c1c2d09a77324bc26dcfe", + "rev": "ef4034d35ab9bfda6cf4670be2016a029e954f66", "type": "github" }, "original": { @@ -370,11 +354,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1647936981, - "narHash": "sha256-GhtaXevrBE/iMQ400UZZZWnGt8QEosO9HN2o13CSmNE=", + "lastModified": 1650961252, + "narHash": "sha256-TYNm2ZRNg0TXI/IdKGSJ527MFaks+6aY2kL7NX7TpWo=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "7d3571d6adc7968db62c9e78b039bd295c3ff33f", + "rev": "184a46c1fc32d0b3c1a5aaad26249f1a970e4d3c", "type": "github" }, "original": { @@ -414,20 +398,20 @@ "old": "old", "rust": "rust", "stable": "stable", - "utils": "utils_4" + "utils": "utils_3" } }, "rust": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1647916392, - "narHash": "sha256-xiZ4Bzj2KLzphnBh6zMBKm/Icc7grN8CcaFepXhx8y4=", + "lastModified": 1650941217, + "narHash": "sha256-rWpp8pKM9jYcvG7JiNAw+ITOlY20h8K83S3RQc9pY74=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a4ba09b440c10a45124aa75667c36549ddadac4d", + "rev": "b4cc9abdd42655b61325f3feb062cacc51a54de2", "type": "github" }, "original": { @@ -438,11 +422,11 @@ }, "stable": { "locked": { - "lastModified": 1647624696, - "narHash": "sha256-6u7WHfTGPbo21p3j23hJmkE0CtJCklrRE/aHm0uavIg=", + "lastModified": 1650921206, + "narHash": "sha256-RGlfTC2ktqLVw0gBvZeCM//B4ig2CdQJm39sDvm0DBQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "60779b2fde21d3d48bc1999fc0ce6540eba07924", + "rev": "3a9e0f239d80fa134e8fcbdee4dfc793902da37e", "type": "github" }, "original": { @@ -483,30 +467,12 @@ } }, "utils_3": { - "inputs": { - "flake-utils": "flake-utils" - }, "locked": { - "lastModified": 1647259887, - "narHash": "sha256-yEkMbEHVO9qydluQ3uHGWX1PkfZhgDKxnd1rhZYZ72w=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "06dba5f3b4fa2cc0bfc98ce9cd6f9a4d8db11d46", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "type": "github" - } - }, - "utils_4": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "owner": "numtide", "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7175c64..037f1f3 100644 --- a/flake.nix +++ b/flake.nix @@ -84,7 +84,9 @@ imports = [ ./home/natto ] ++ homeModules; - home.packages = [ inputs.home-manager.defaultPackage.${system} ]; + home.packages = [ + inputs.home-manager.defaultPackage.${system} + ]; nixpkgs = { overlays = self.legacyPackages.${system}.overlays; config.allowUnfree = true; diff --git a/home/natto/config/emacs/config.org b/home/natto/config/emacs/config.org index ad5f10b..4b169d2 100644 --- a/home/natto/config/emacs/config.org +++ b/home/natto/config/emacs/config.org @@ -45,7 +45,6 @@ c-white-2 "#fdf6e3") #+end_src ** Setting some variables -SCHEDULED: <2022-03-19 Sat> #+begin_src emacs-lisp (setq initial-major-mode 'emacs-lisp-mode frame-resize-pixelwise t @@ -96,7 +95,7 @@ SCHEDULED: <2022-03-19 Sat> #+end_src ** Configure Selectrum -Enable selectrum and remap keys to Colemak-DH +Enable selectrum #+begin_src emacs-lisp (use-package selectrum :config @@ -120,7 +119,8 @@ Add orderless for selectrum (use-package orderless :after selectrum :config - (setq completion-styles '(orderless)) + (setq completion-styles '(orderless basic)) + (add-to-list 'orderless-matching-styles 'orderless-flex) (savehist-mode) (setq orderless-skip-highlighting (lambda () selectrum-is-active)) (setq selectrum-highlight-candidates-function #'orderless-highlight-matches)) @@ -129,15 +129,34 @@ Add orderless for selectrum ** Evil *** Configure evil mode #+begin_src emacs-lisp +(defun my/evil-shift-right () + (interactive) + (evil-shift-right evil-visual-beginning evil-visual-end) + (evil-normal-state) + (evil-visual-restore)) + +(defun my/evil-shift-left () + (interactive) + (evil-shift-left evil-visual-beginning evil-visual-end) + (evil-normal-state) + (evil-visual-restore)) + (use-package evil :init (setq-default evil-shift-width 2) :config + (setq org-src-fontify-natively t + org-src-strip-leading-and-trailing-blank-lines t + org-src-preserve-indentation t + org-src-tab-acts-natively t) (evil-set-initial-state 'vterm-mode 'insert) (evil-set-undo-system 'undo-tree) + (evil-define-key 'visual global-map (kbd ">") 'my/evil-shift-right) + (evil-define-key 'visual global-map (kbd "<") 'my/evil-shift-left) (evil-mode 1)) #+end_src + *** Configure undo tree To undo and redo easily like vi #+begin_src emacs-lisp @@ -156,6 +175,11 @@ To get colemak-dh bindings in evil mode (global-evil-colemak-basics-mode 1)) #+end_src +*** Miscellaneous evil related packages +#+begin_src emacs-lisp +(use-package evil-terminal-cursor-changer) +#+end_src + ** Treemacs *** Dependencies #+begin_src emacs-lisp @@ -176,15 +200,17 @@ To get colemak-dh bindings in evil mode Configure treemacs-evil to get colemak-dh bindings #+begin_src emacs-lisp (use-package treemacs-evil :config + (define-key evil-treemacs-state-map (kbd "j") nil) + (define-key evil-treemacs-state-map (kbd "k") nil) (define-key evil-treemacs-state-map (kbd "n") #'treemacs-next-line) (define-key evil-treemacs-state-map (kbd "e") #'treemacs-previous-line) (define-key evil-treemacs-state-map (kbd "M-n") #'treemacs-next-neighbour) (define-key evil-treemacs-state-map (kbd "M-e") #'treemacs-previous-neighbour) (define-key evil-treemacs-state-map (kbd "M-N") #'treemacs-next-line-other-window) (define-key evil-treemacs-state-map (kbd "M-E") #'treemacs-previous-line-other-window) - ; (define-key evil-treemacs-state-map (kbd "M") #'treemacs-collapse-parent-node) - (define-key evil-treemacs-state-map (kbd "m") #'treemacs-COLLAPSE-action) - (define-key evil-treemacs-state-map (kbd "i") #'treemacs-RET-action) + (define-key evil-treemacs-state-map (kbd "M") #'treemacs-collapse-parent-node) + (evil-define-key 'treemacs treemacs-mode-map (kbd "m") #'treemacs-COLLAPSE-action) + (evil-define-key 'treemacs treemacs-mode-map (kbd "i") #'treemacs-RET-action) ) #+end_src @@ -218,14 +244,21 @@ Configure treemacs-evil to get colemak-dh bindings (lsp-ui-doc-enable 1)) #+end_src +*** Language specific LSP packages +#+begin_src emacs-lisp +(use-package lsp-haskell) +#+end_src + *** Configure flycheck #+begin_src emacs-lisp (use-package flycheck) #+end_src + *** Configure dap-mode #+begin_src emacs-lisp (use-package dap-mode) #+end_src + ** Company *** Configure company For autocomplete @@ -234,6 +267,9 @@ For autocomplete :defer 0 :after lsp-mode :config + (add-to-list 'company-backends 'company-dabbrev) + (setq company-backends (cons 'company-files (remove 'company-files company-backends))) + (company-mode 1) (define-key company-active-map (kbd "C-n") 'company-select-next) (define-key company-active-map (kbd "C-e") 'company-select-previous) (define-key company-search-map (kbd "C-n") 'company-select-next) @@ -260,6 +296,8 @@ For autocomplete ** Lang support #+begin_src emacs-lisp +(use-package haskell-mode) + (use-package rustic) (use-package nix-mode @@ -349,15 +387,35 @@ For autocomplete (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) #+end_src -** Add helper packages for exporting +** Babel and exports #+begin_src emacs-lisp - (use-package htmlize) +(use-package htmlize) +(add-to-list 'org-latex-packages-alist '("" "minted")) +(setq org-latex-listings 'minted) + +(setq org-latex-pdf-process + '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" + "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" + "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) + +(setq org-src-fontify-natively t) + +(org-babel-do-load-languages + 'org-babel-load-languages + '((awk . t) + (python . t) + (C . t) + (shell . t) + (sql . t) + (latex . t))) #+end_src * Mode specific hooks #+begin_src emacs-lisp (add-hook 'c-mode-hook 'lsp) (add-hook 'c++-mode-hook 'lsp) +(add-hook 'haskell-mode-hook #'lsp) +(add-hook 'haskell-literate-mode-hook #'lsp) #+end_src * Custom mode line @@ -396,8 +454,7 @@ For autocomplete '((:propertize " %b " face mode-line-buf-name) (vc-mode (:propertize (" " vc-mode " " ) face mode-line-vc)) (:propertize (" " mode-name " ") face mode-line-maj-mode) - (:propertize ("[[ %l | %c || %p . %+%@ ]]") face mode-line-info) - ("%-"))) + (:propertize (" [[ %l | %c || %p . %+%@ ]] ") face mode-line-info))) (setq exclude-ln '(term-mode-hook eshell-mode-hook shell-mode-hook)) (while exclude-ln @@ -450,14 +507,12 @@ This returns the command to run in the terminal (let ((full buffer-file-name) (file (file-name-sans-extension buffer-file-name))) (pcase (file-name-extension full) - ("c" (concat "gcc " full " -o " file " && " file " && rm " file)) + ("c" (concat "gcc " full "-lm -pthread -o " file " && " file " && rm " file)) ("java" (concat "java" full)) ("py" (concat "python" full)) ("cpp" (concat "g++ " full " -o " file " && " file " && rm " file)) ("hs" (concat "ghc -dynamic" full " && " file " && rm " file " " file ".o")) ("sh" (concat "sh" full)) - ("bash" (concat "bash" full)) - ("zsh" (concat "zsh" full)) ("js" (concat "node" full)) ("ts" (concat "tsc" full " && node " file ".js && rm " file ".js" )) ("rs" (concat "rustc" full " -o " file " && " file " && rm " file))))) @@ -480,8 +535,8 @@ This returns the command to run in the terminal "C-i" 'windmove-right "C-n" 'windmove-down "C-e" 'windmove-up - "M-," 'previous-buffer - "M-." 'next-buffer + "M-," 'centaur-tabs-backward + "M-." 'centaur-tabs-forward "C-q" 'delete-window "M-C-S-q" 'kill-buffer-and-window "M-w" 'centaur-tabs--kill-this-buffer-dont-ask @@ -500,8 +555,8 @@ Pop-up terminal specific keybinds "" 'vterm-toggle "" (lambda () (interactive) (run-in-vterm (candrun)))) - (define-key vterm-mode-map (kbd "") 'vterm-toggle-forward) - (define-key vterm-mode-map (kbd "") 'vterm-toggle-backward) + (define-key vterm-mode-map (kbd "") 'vterm-toggle-forward) + (define-key vterm-mode-map (kbd "") 'vterm-toggle-backward) (general-define-key :states '(normal insert) @@ -514,15 +569,18 @@ Pop-up terminal specific keybinds Toggle Appearance #+begin_src emacs-lisp (defun toggle-theme-shade () - (if (symbol-value dark-theme) - (progn (disable-theme 'doom-solarized-dark) - (load-theme 'doom-solarized-light t)) - (progn (disable-theme 'doom-solarized-light) - (load-theme 'doom-solarized-dark t))) - (setq-local dark-theme (not dark-theme))) + (if (symbol-value dark-theme) + (progn (disable-theme 'doom-solarized-dark) + (load-theme 'doom-solarized-light t)) + (progn (disable-theme 'doom-solarized-light) + (load-theme 'doom-solarized-dark t))) + (setq-local dark-theme (not dark-theme)) + (centaur-tabs-display-update) + (centaur-tabs-headline-match) + ) (general-define-key - :states '(normal insert emacs) - "" (lambda () (interactive) (toggle-theme-shade))) + :states '(normal) + "" (lambda () (interactive) (toggle-theme-shade))) ) #+end_src diff --git a/home/natto/pkgs.nix b/home/natto/pkgs.nix index e20345c..789fc22 100644 --- a/home/natto/pkgs.nix +++ b/home/natto/pkgs.nix @@ -55,7 +55,23 @@ (master.tauon.override { withDiscordRPC = true; }) nbfc-linux pulseaudio - (texlive.combine { inherit (texlive) scheme-small babel lm graphics-def url mhchem wrapfig capt-of; }) + (texlive.combine { + inherit (texlive) + scheme-small + babel + lm + graphics-def + url + mhchem + wrapfig + capt-of + minted + fvextra + xstring + catchfile + framed + upquote; + }) # carla # electrum anki-bin @@ -73,5 +89,9 @@ element-desktop syncplay betterdiscordctl + python3Packages.pygments + calibre + easyeffects + noisetorch ]; } diff --git a/home/natto/programs.nix b/home/natto/programs.nix index ef3a611..eeb670b 100644 --- a/home/natto/programs.nix +++ b/home/natto/programs.nix @@ -10,10 +10,10 @@ # userContent = builtins.readFile ./config/firefox/userContent.css; }; }; - /* chromium = { + chromium = { enable = true; package = pkgs.ungoogled-chromium; - }; */ + }; zathura = { enable = true; extraConfig = builtins.readFile ./config/zathura/zathurarc; @@ -38,7 +38,7 @@ enable = true; mpdMusicDir = ~/Music; settings = { - albumart = "yes"; + # albumart = "yes"; locked_screen_width_part = 25; autocenter_mode = "yes"; follow_now_playing_lyrics = "yes"; diff --git a/hosts/satori/hardware.nix b/hosts/satori/hardware.nix index d363cbc..3e9e437 100644 --- a/hosts/satori/hardware.nix +++ b/hosts/satori/hardware.nix @@ -14,7 +14,7 @@ fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/ACBA-9B3F"; + device = "/dev/disk/by-uuid/2424-5639"; fsType = "vfat"; }; fileSystems."/mnt/Games" = diff --git a/hosts/satori/pkgs.nix b/hosts/satori/pkgs.nix index 1c2cbbf..3ef6df9 100644 --- a/hosts/satori/pkgs.nix +++ b/hosts/satori/pkgs.nix @@ -17,6 +17,7 @@ kbd cachix gcc + glibc.static stable.openjdk virtmanager tree-sitter diff --git a/hosts/satori/services.nix b/hosts/satori/services.nix index 2f3c031..ada4ea0 100644 --- a/hosts/satori/services.nix +++ b/hosts/satori/services.nix @@ -13,7 +13,7 @@ ACTION=="add|change", KERNEL=="sda", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq" ''; }; - systemd.services.tor.wantedBy = lib.mkForce []; + systemd.services.tor.wantedBy = lib.mkForce [ ]; systemd.enableUnifiedCgroupHierarchy = false; security.pki.certificateFiles = [ ../../cert.pem ]; virtualisation.libvirtd = { diff --git a/hosts/satori/stuff.nix b/hosts/satori/stuff.nix index c355d3d..41646c2 100644 --- a/hosts/satori/stuff.nix +++ b/hosts/satori/stuff.nix @@ -22,7 +22,7 @@ }; }; security = { - sudo.enable = false; + sudo.enable = true; doas = { enable = true; extraRules = [ diff --git a/modules/graphics.nix b/modules/graphics.nix index 0f11259..0952e99 100644 --- a/modules/graphics.nix +++ b/modules/graphics.nix @@ -13,29 +13,33 @@ in nvidia-offload ]; hardware = { - opengl = + /* opengl = let - fn = oa: with lib; { - nativeBuildInputs = oa.nativeBuildInputs ++ singleton pkgs.glslang; - mesonFlags = oa.mesonFlags ++ singleton "-Dvulkan-layers=device-select,overlay"; - patches = oa.patches ++ singleton ./mesa-vulkan-layer-nvidia.patch; - postInstall = oa.postInstall + '' - mv $out/lib/libVkLayer* $drivers/lib - layer=VkLayer_MESA_device_select - substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \ - --replace "lib''${layer}" "$drivers/lib/lib''${layer}" - layer=VkLayer_MESA_overlay - substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \ - --replace "lib''${layer}" "$drivers/lib/lib''${layer}" - ''; - }; + fn = oa: with lib; { + nativeBuildInputs = oa.nativeBuildInputs ++ singleton pkgs.glslang; + mesonFlags = oa.mesonFlags ++ singleton "-Dvulkan-layers=device-select,overlay"; + patches = oa.patches ++ singleton ./mesa-vulkan-layer-nvidia.patch; + postInstall = oa.postInstall + '' + mv $out/lib/libVkLayer* $drivers/lib + layer=VkLayer_MESA_device_select + substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \ + --replace "lib''${layer}" "$drivers/lib/lib''${layer}" + layer=VkLayer_MESA_overlay + substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \ + --replace "lib''${layer}" "$drivers/lib/lib''${layer}" + ''; + }; in with pkgs; { - driSupport32Bit = true; - enable = true; - package = (mesa.overrideAttrs fn).drivers; - package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers; - }; + driSupport32Bit = true; + enable = true; + package = (mesa.overrideAttrs fn).drivers; + package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers; + };*/ + opengl = { + driSupport32Bit = true; + enable = true; + }; nvidia = { prime = { # sync.enable = true; diff --git a/overlays/overridesandshit.nix b/overlays/overridesandshit.nix index d973128..d9a2111 100644 --- a/overlays/overridesandshit.nix +++ b/overlays/overridesandshit.nix @@ -29,15 +29,15 @@ final: prev: { clockSupport = true; }; - picom = prev.picom.overrideAttrs (oldAttrs: rec{ + /*picom = prev.picom.overrideAttrs (oldAttrs: rec{ src = prev.fetchFromGitHub { - owner = "jonaburg"; - repo = "picom"; - rev = "a8445684fe18946604848efb73ace9457b29bf80"; - sha256 = "sha256-R+YUGBrLst6CpUgG9VCwaZ+LiBSDWTp0TLt1Ou4xmpQ="; - fetchSubmodules = true; + owner = "jonaburg"; + repo = "picom"; + rev = "a8445684fe18946604848efb73ace9457b29bf80"; + sha256 = "sha256-R+YUGBrLst6CpUgG9VCwaZ+LiBSDWTp0TLt1Ou4xmpQ="; + fetchSubmodules = true; }; - }); + });*/ proxychains = prev.proxychains.overrideAttrs (_: { postInstall = ":";