diff options
| author | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-03-07 00:34:30 +0100 |
|---|---|---|
| committer | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-03-07 00:34:30 +0100 |
| commit | 7b5bf013daf1038cc11872868e6822eb14eb2861 (patch) | |
| tree | 194c639a8efb86c94165fd84dbe8948bbe804483 | |
| parent | 26b851c43bd88a9626fc9e18a4a9d0b235b3f2a2 (diff) | |
Slim down client machines, fix some issues
- completely remove emacs module
- use nixpkgs hyprland package instead of the flake
- fix tofi desktop file cache issue
- update flake lock
- wonderland: remove madhatter
- remove hyprdesktop module from clients' sharedModules and move it into
the users' individual modules wherever it's needed
| -rw-r--r-- | flake.lock | 297 | ||||
| -rw-r--r-- | flake.nix | 4 | ||||
| -rw-r--r-- | hosts/underworld/home.nix | 20 | ||||
| -rw-r--r-- | hosts/wonderland/home.nix | 10 | ||||
| -rw-r--r-- | share/home/emacs/default.nix | 27 | ||||
| -rw-r--r-- | share/home/emacs/early-init.el | 13 | ||||
| -rw-r--r-- | share/home/emacs/emacs.el | 236 | ||||
| -rw-r--r-- | share/home/hyprdesktop.nix | 11 | ||||
| -rw-r--r-- | share/home/tofi.nix | 13 | ||||
| -rw-r--r-- | share/system/client-common.nix | 2 | ||||
| -rw-r--r-- | share/system/common.nix | 15 | ||||
| -rw-r--r-- | share/system/hyprland.nix | 7 |
12 files changed, 54 insertions, 601 deletions
@@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1709439398, - "narHash": "sha256-MW0zp3ta7SvdpjvhVCbtP20ewRwQZX2vRFn14gTc4Kg=", + "lastModified": 1709682352, + "narHash": "sha256-71S/64RbyADT6FUVJq4WLiNbmcxFvgMsSihf/C2Hgno=", "owner": "nix-community", "repo": "disko", - "rev": "1f76b318aa11170c8ca8c225a9b4c458a5fcbb57", + "rev": "ad5e8bd14df2e6bdb836582577dc163318617738", "type": "github" }, "original": { @@ -41,26 +41,6 @@ "type": "github" } }, - "emacs-overlay": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1709516695, - "narHash": "sha256-oymuRjQUhUx71xb4N1P9QFx+OmpnSF3pJKU1tsZBlE8=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "dcb6c5cc11efa3ab804960537242217cf335b230", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, "flake-compat": { "flake": false, "locked": { @@ -134,24 +114,6 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, - "locked": { "lastModified": 1701680307, "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", @@ -165,9 +127,9 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_3": { "inputs": { - "systems": "systems_5" + "systems": "systems_3" }, "locked": { "lastModified": 1685518550, @@ -233,11 +195,11 @@ ] }, "locked": { - "lastModified": 1709485962, - "narHash": "sha256-rmFB4uE10+LJbcVE4ePgiuHOBlUIjQOeZt4VQVJTU8M=", + "lastModified": 1709764752, + "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", "owner": "nix-community", "repo": "home-manager", - "rev": "d579633ff9915a8f4058d5c439281097e92380a8", + "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", "type": "github" }, "original": { @@ -246,90 +208,17 @@ "type": "github" } }, - "hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", - "nixpkgs": "nixpkgs_2", - "systems": "systems_3", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1709506828, - "narHash": "sha256-4gmgQvJZX5KM5i9bqGEOsHSBVRQhyfSF9BvvfpBFmQE=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "9d89b7109da9b58904caf7c53a7af4b6daed1696", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1708787654, - "narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "0fce791ba2334aca183f2ed42399518947550d0d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1709237383, - "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", - "owner": "NixOS", + "lastModified": 1709479366, + "narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", + "rev": "b8697e57f10292a6165a20f03d2f42920dfaf973", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -355,22 +244,6 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1709309926, - "narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "79baff8812a0d68e24a836df0a364c678089e2c7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { "lastModified": 1704874635, "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", "owner": "NixOS", @@ -385,7 +258,7 @@ "type": "github" } }, - "nixpkgs-stable_3": { + "nixpkgs-stable_2": { "locked": { "lastModified": 1709428628, "narHash": "sha256-//ZCCnpVai/ShtO2vPjh3AWgo8riXCaret6V9s7Hew4=", @@ -401,7 +274,7 @@ "type": "github" } }, - "nixpkgs-stable_4": { + "nixpkgs-stable_3": { "locked": { "lastModified": 1685801374, "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", @@ -417,47 +290,15 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1708807242, - "narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1709237383, - "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "gitignore": "gitignore", "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { "lastModified": 1708018599, @@ -476,13 +317,13 @@ "pre-commit-hooks-nix_2": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "gitignore": "gitignore_2", "nixpkgs": [ "sorre-website", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_4" + "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { "lastModified": 1699271226, @@ -502,11 +343,9 @@ "inputs": { "devshell": "devshell", "disko": "disko", - "emacs-overlay": "emacs-overlay", "flake-parts": "flake-parts", "home-manager": "home-manager", - "hyprland": "hyprland", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "scripts": "scripts", "sops-nix": "sops-nix", @@ -545,14 +384,14 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1709434911, - "narHash": "sha256-UN47hQPM9ijwoz7cYq10xl19hvlSP/232+M5vZDOMs4=", + "lastModified": 1709711091, + "narHash": "sha256-L0rSIU9IguTG4YqSj4B/02SyTEz55ACq5t8gXpzteYc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "075df9d85ee70cfb53e598058045e1738f05e273", + "rev": "25dd60fdd08fcacee2567a26ba6b91fe098941dc", "type": "github" }, "original": { @@ -623,36 +462,6 @@ }, "systems_3": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", @@ -673,11 +482,11 @@ ] }, "locked": { - "lastModified": 1709373438, - "narHash": "sha256-F/Vieen5x2nf05KJ5AitoE/GSB0FU2jMffSM8bHSuBs=", + "lastModified": 1709546977, + "narHash": "sha256-R0bi8zAWt1s1q7lSvwiFI8+kEL29rm4WtYTqPgjlEBs=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "093f82e5707bb6f14ee38a742748f9fb4ab1488e", + "rev": "e7a277c5d12bf570efa2427d9cfdb760b9a0512f", "type": "github" }, "original": { @@ -685,58 +494,6 @@ "repo": "treefmt-nix", "type": "github" } - }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1708558866, - "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1708696469, - "narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "1b713911c2f12b96c2574474686e4027ac4bf826", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } } }, "root": "root", @@ -41,10 +41,6 @@ inputs.devshell.follows = "devshell"; inputs.treefmt-nix.follows = "treefmt-nix"; }; - - # No inputs overrides so I can (hopefully) use the binary cache(s) - hyprland.url = "github:hyprwm/Hyprland"; - emacs-overlay.url = "github:nix-community/emacs-overlay"; }; outputs = inputs@{ flake-parts, ... }: diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix index 9132a42..4e3b519 100644 --- a/hosts/underworld/home.nix +++ b/hosts/underworld/home.nix @@ -1,30 +1,18 @@ -{ flakeRoot -, inputs -, pkgs -, ... -}: { +{ flakeRoot, inputs, ... }: { home-manager = { useGlobalPkgs = true; useUserPackages = true; - sharedModules = [{ - imports = [ - (flakeRoot + /share/home/hyprdesktop.nix) - (flakeRoot + /share/home/fish.nix) - ]; - }]; + sharedModules = [{ imports = [ (flakeRoot + /share/home/fish.nix) ]; }]; extraSpecialArgs = { inherit inputs; }; }; home-manager.users.osiris = { imports = [ + (flakeRoot + /share/home/hyprdesktop.nix) (flakeRoot + /share/home/gallery-dl.nix) ]; - home.packages = with pkgs; [ mullvad tor tor-browser ]; - home.stateVersion = "23.11"; }; - home-manager.users.root = { - home.stateVersion = "23.11"; - }; + home-manager.users.root.home.stateVersion = "23.11"; } diff --git a/hosts/wonderland/home.nix b/hosts/wonderland/home.nix index 759f728..753ad85 100644 --- a/hosts/wonderland/home.nix +++ b/hosts/wonderland/home.nix @@ -8,7 +8,6 @@ useUserPackages = true; sharedModules = [{ imports = [ - (flakeRoot + /share/home/hyprdesktop.nix) (flakeRoot + /share/home/fish.nix) ]; }]; @@ -17,6 +16,7 @@ home-manager.users.alice = { imports = [ + (flakeRoot + /share/home/hyprdesktop.nix) (flakeRoot + /share/home/gallery-dl.nix) ]; @@ -26,11 +26,5 @@ home.stateVersion = "22.05"; }; # End of users.alice - home-manager.users.madhatter = { - home.stateVersion = "23.05"; - }; - - home-manager.users.root = { - home.stateVersion = "22.05"; - }; + home-manager.users.root.home.stateVersion = "22.05"; } diff --git a/share/home/emacs/default.nix b/share/home/emacs/default.nix deleted file mode 100644 index 22f6ee7..0000000 --- a/share/home/emacs/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: -let - my-emacs = pkgs.emacsWithPackagesFromUsePackage { - config = ./emacs.el; - defaultInitFile = true; - package = pkgs.emacs-pgtk; - alwaysEnsure = true; - }; -in -{ - home.packages = [ my-emacs ]; - - xdg.configFile = { - emacs-init = { - enable = true; - target = "emacs/init.el"; - text = '' - (setq inhibit-startup-screen t) - ''; - }; - emacs-early-init = { - enable = true; - target = "emacs/early-init.el"; - source = ./early-init.el; - }; - }; -} diff --git a/share/home/emacs/early-init.el b/share/home/emacs/early-init.el deleted file mode 100644 index bc32deb..0000000 --- a/share/home/emacs/early-init.el +++ /dev/null @@ -1,13 +0,0 @@ -;;; early-init.el --- Early Initalization -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(push '(menu-bar-mode . 0) default-frame-alist) -(push '(tool-bar-lines . 0) default-frame-alist) -(push '(vertical-scroll-bars) default-frame-alist) - -;; All our packages come from Nix -(setq package-enable-at-startup nil - package-archives nil) -(provide 'early-init) -;;; early-init.el ends here diff --git a/share/home/emacs/emacs.el b/share/home/emacs/emacs.el deleted file mode 100644 index 926face..0000000 --- a/share/home/emacs/emacs.el +++ /dev/null @@ -1,236 +0,0 @@ -;;; init.el --- Initalization -*- lexical-binding: t; -*- -;;; -;;; Commentary: -;;; Various resources were used to hack together this config: -;;; - https://sanemacs.com/ -;;; - https://rossabaker.com/configs/emacs/ -;;; -;;; Code: - -;;;;;;;;;;;;;;;;;;;;;;; -;;; Startup ;;; -;;;;;;;;;;;;;;;;;;;;;;; - -;;; Startup - Use package ;;; - -;; some packages complain if I don't have this -(use-package bind-key - :demand t - :bind - (:prefix-map rab/files-map - :prefix "C-c f") - :bind - (:prefix-map rab/toggles-map - :prefix "C-c t")) - -;;; Startup - Benchmarking ;;; - -(use-package benchmark-init - :ensure t - :demand t - :hook (after-init . benchmark-init/deactivate) - :config - (benchmark-init/activate)) - -;;; Startup - Garbage collection ;;; - -(use-package gcmh - :ensure t - :diminish - :init (setq gc-cons-threshold (* 80 1024 1024)) - :hook (emacs-startup . gcmh-mode)) - -;;; Startup - Better cache location ;;; -(use-package no-littering - :ensure t - :init - (setq no-littering-etc-directory "~/.cache/emacs/etc/" - no-littering-var-directory "~/.cache/emacs/var/") - (when (fboundp 'startup-redirect-eln-cache) - (startup-redirect-eln-cache - (convert-standard-filename - (expand-file-name "eln-cache/" no-littering-var-directory)))) - :config - (no-littering-theme-backups)) - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Customization ;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;; Customization - General settings ;;; - -(use-package emacs - :init - (setq inhibit-startup-screen t - initial-scratch-message nil - initial-major-mode 'text-mode - ring-bell-function 'ignore - use-file-dialog nil) - - (tool-bar-mode -1) - (scroll-bar-mode -1) - - (setq-default cursor-type 'bar - frame-title-format '("%b") - ;; Use spaces, but configure tab-width for modes that use tabs - indent-tabs-mode nil - tab-width 2) - - (fset 'yes-or-no-p 'y-or-n-p) - (show-paren-mode 1) ; Show closing parens - (global-auto-revert-mode t) ; Auto-update buffer on file change - (setopt create-lockfiles nil) - (electric-pair-mode 1) ; Autopairs - (global-hl-line-mode) - - (defun mb/enable-fill-column () - "Enable vertical ruler" - (interactive) - (setq fill-column 80) - (display-fill-column-indicator-mode)) - - (defun display-startup-echo-area-message () - (message "")) - - :hook (prog-mode . mb/enable-fill-column) - :bind (("C-z" . undo) - ("C-S-z" . undo-redo) - ("C-x h" . previous-buffer) - ("C-x l" . next-buffer))) - -;;; Customization - Scrolling ;;; -;; TODO: Smooth scroll - -;;; Customization - Theme ;;; - -(use-package doom-themes - :demand - :config - ;; Global settings (defaults) - (setq doom-themes-enable-bold t ; if nil, bold is universally disabled - doom-themes-enable-italic t) ; if nil, italics is universally disabled - (load-theme 'doom-laserwave t)) - - -;;; Customization - Modeline ;;; -(use-package doom-modeline - :ensure t - :config (doom-modeline-mode 1)) - -(use-package nerd-icons - :custom - (nerd-icons-font-family "FiraCode Nerd Font Mono")) - -(use-package nyan-mode - :config (nyan-mode)) - -;;; Customization - Evil ;;; - -;; Set up vi keybinds -(use-package evil - :demand - :init - (defun mb/enable-line-numbers () - "Enable relative line numbers" - (interactive) - (display-line-numbers-mode) - (setq display-line-numbers 'relative)) - - :hook ((prog-mode . evil-local-mode) - (text-mode . evil-local-mode) - (evil-mode . mb/enable-line-numbers) - (evil-local-mode . mb/enable-line-numbers))) - -;;; Customization - Direnv support ;;; - -(use-package envrc - :ensure t - :hook (on-first-file . envrc-global-mode)) - -;;; Customziation - Completion framework ;;; - -(use-package helm - :config - (setq helm-completion-style 'emacs)) - -(use-package helm-mode - :config - (helm-mode 1)) - -(use-package fussy - :config - (push 'fussy completion-styles) - (setq - ;; For example, project-find-file uses 'project-files which uses - ;; substring completion by default. Set to nil to make sure it's using - ;; flx. - completion-category-defaults nil - completion-category-overrides nil)) - -;;; Customization - Project management ;;; - -;; (use-package projectile -;; :bind-keymap ("C-c p" . projectile-command-map) -;; :config -;; (projectile-mode +1)) - -;;; Customization - Completions ;;; - -(use-package company - :hook (prog-mode . company-mode)) - -;;; Customization - Syntax checking ;;; - -(use-package flycheck - :hook (prog-mode . flycheck-mode)) - -;;; Customization - Which key ;;; - -(use-package which-key - :init - (setq which-key-idle-delay 0.1) - :config - (which-key-mode +1)) - -;;; Customization - LSP support ;;; - -(use-package eglot - ; nix-mode doesn't have a hook for some reason - :mode ("\\.nix\\'" "\\.nix.in\\'")) - -;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Languages ;;; -;;;;;;;;;;;;;;;;;;;;;;;;; - -;;; Languages - Nix ;;; - -(use-package nix-mode - :mode ("\\.nix\\'" "\\.nix.in\\'")) - -;;; Languages - Coq ;;; - -(use-package proof-general - :mode ("\\.v\\'" . coq-mode)) - - -;;; Languages - Rust ;;; - -(use-package rustic - :init - (setq rustic-lsp-client 'eglot) - (defun rustic-mode-auto-save-hook () - "Enable auto-saving in rustic-mode buffers." - (when buffer-file-name - (setq-local compilation-ask-about-save nil))) - :hook (rustic-mode . rustic-mode-auto-save-hook)) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Useful modes ;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;; Useful modes - magit ;;; - -(use-package magit) - -;;; emacs.el ends here diff --git a/share/home/hyprdesktop.nix b/share/home/hyprdesktop.nix index 166a18b..6f923e7 100644 --- a/share/home/hyprdesktop.nix +++ b/share/home/hyprdesktop.nix @@ -1,7 +1,7 @@ # Module containing a bunch of things that make up a `desktop environment` built # off of hyprland. I install this on all my desktop/laptop machines. # IMPORTANT: this module requires the system to already have `programs.hyprland` -# enabled. You can enable it by importing `share/system/hyprland.nix` +# enabled. { pkgs, config, inputs, ... }: { imports = [ # Custom home manager modules @@ -18,7 +18,6 @@ ./kitty.nix ./offpunk.nix ./firefox - #./emacs ./helix.nix ]; @@ -169,6 +168,7 @@ zathura # document reader bitwarden # password manager heroic # FOSS game launcher for GOG & Epic + foliate # Gaming jdk17_headless @@ -198,13 +198,14 @@ ]; userDirs = let - home = config.home.homeDirectory; + annex = "${config.home.homeDirectory}/Annex"; in { enable = true; createDirectories = true; - pictures = "${home}/Annex/Pictures"; - music = "${home}/Annex/Music"; + pictures = "${annex}/Pictures"; + music = "${annex}/Music"; + documents = "${annex}/Documents"; }; }; } diff --git a/share/home/tofi.nix b/share/home/tofi.nix index b53aca4..b0a7a89 100644 --- a/share/home/tofi.nix +++ b/share/home/tofi.nix @@ -1,7 +1,18 @@ # IMPORTANT: this is the config for a custom module that's located at # /share/hm-modules/tofi.nix. In order to use this config you have to also # import that module. -{ ... }: { +{ lib, config, ... }: { + + # Tofi's cache seems to get messed up sometimes, so we regenerate it when + # building the system. + # https://github.com/philj56/tofi/issues/115#issuecomment-1701748297 + home.activation = { + regenerateTofiCache = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + tofi_cache=${config.xdg.cacheHome}/tofi-drun + [[ -f "$tofi_cache" ]] && rm "$tofi_cache" + ''; + }; + programs.tofi = { enable = true; settings = { diff --git a/share/system/client-common.nix b/share/system/client-common.nix index 63c5219..c58a0f5 100644 --- a/share/system/client-common.nix +++ b/share/system/client-common.nix @@ -2,10 +2,10 @@ { pkgs, ... }: { imports = [ - ./hyprland.nix ./steam.nix ]; + programs.hyprland.enable = true; boot.supportedFilesystems = [ "ntfs" "bcachefs" ]; nixpkgs.config.allowUnfree = true; diff --git a/share/system/common.nix b/share/system/common.nix index d8bea21..b280667 100644 --- a/share/system/common.nix +++ b/share/system/common.nix @@ -1,21 +1,8 @@ # Common system settings shared across every machine # Used mostly for adding substituters and such -{ inputs, ... }: { +{ ... }: { nix.settings = { experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; - - extra-substituters = [ - "https://hyprland.cachix.org" - "https://nix-community.cachix.org" - ]; - extra-trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; }; - nixpkgs.overlays = [ - inputs.hyprland.overlays.default - #inputs.emacs-overlay.overlays.default - ]; } diff --git a/share/system/hyprland.nix b/share/system/hyprland.nix index 2e1c679..8b13789 100644 --- a/share/system/hyprland.nix +++ b/share/system/hyprland.nix @@ -1,6 +1 @@ -{ inputs, pkgs, ... }: { - programs.hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - }; -} + |
