diff --git a/config/emacs/emacs.org b/config/emacs/emacs.org index 1032a1ec..37f9c87f 100644 --- a/config/emacs/emacs.org +++ b/config/emacs/emacs.org @@ -509,8 +509,9 @@ make sure to setup authinfo #+end_src ***** Nix #+begin_src emacs-lisp - (use-package nix-mode - :mode "\\.nix\\'") + (use-package nix-mode + :hook (nix-mode . format-all-mode) + :mode "\\.nix\\'") #+end_src *** Commenter #+begin_src emacs-lisp @@ -536,7 +537,8 @@ make sure to setup authinfo *** Formatting #+begin_src emacs-lisp (use-package format-all - :hook ('prog-mode-hook . 'format-all-mode)) + :config + (setq format-all-formatters '(("Nix" . "alejandra")))) #+end_src ** Dired (quick file management in emacs) Dired is a built-in file manager for Emacs that does some pretty amazing things! Here are some key bindings you should try out: diff --git a/config/emacs/init.el b/config/emacs/init.el index 12cdb6e4..481c4e33 100644 --- a/config/emacs/init.el +++ b/config/emacs/init.el @@ -434,6 +434,7 @@ :hook (js2-mode . lsp-deferred)) (use-package nix-mode + :hook (nix-mode . format-all-mode) :mode "\\.nix\\'") (use-package evil-nerd-commenter @@ -454,7 +455,8 @@ :hook (company-mode . company-box-mode)) (use-package format-all - :hook ('prog-mode-hook . 'format-all-mode)) + :config + (setq format-all-formatters '(("Nix" . "alejandra")))) (use-package dired :ensure nil diff --git a/modules/dev/nixd.nix b/modules/dev/nixd.nix index a85bf8af..9a390995 100644 --- a/modules/dev/nixd.nix +++ b/modules/dev/nixd.nix @@ -1,11 +1,16 @@ # nixd nix lsp using nix and nixpkgs # where has this been my whole life -{ outputs, options, config, lib, pkgs, ...}: -with lib; -let - cfg = config.modules.dev.nixd; -in { + outputs, + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.dev.nixd; +in { options.modules.dev.nixd = { enable = mkEnableOption false; }; diff --git a/modules/work/libreoffice/default.nix b/modules/work/libreoffice/default.nix index 1ae1122e..108e85cf 100644 --- a/modules/work/libreoffice/default.nix +++ b/modules/work/libreoffice/default.nix @@ -1,9 +1,14 @@ -{ outputs, options, config, lib, pkgs, ...}: -with lib; -let - cfg = config.modules.work.libreoffice; -in { + outputs, + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.work.libreoffice; +in { options.modules.work.libreoffice = { enable = mkEnableOption false; }; diff --git a/modules/work/onlyoffice/default.nix b/modules/work/onlyoffice/default.nix index 80222727..73668c26 100644 --- a/modules/work/onlyoffice/default.nix +++ b/modules/work/onlyoffice/default.nix @@ -1,4 +1,5 @@ # i wonder what the difference is + { outputs, options, config, lib, pkgs, ...}: with lib; let