feat(file-templates): add Nix flake file template
This commit is contained in:
parent
4fb75bf17b
commit
a0c0c8994c
3 changed files with 29 additions and 1 deletions
11
config.org
11
config.org
|
|
@ -2181,6 +2181,17 @@ This system works well for the most part, but there's a serious issue with its U
|
|||
|
||||
Now that we have our new-and-improved template registry system, we can add new file templates as we please.
|
||||
|
||||
**** Nix
|
||||
|
||||
The default Nix file template is for a NixOS module. This is nice when you're writing a module, but most Nix files aren't modules. We'll restrict the default template to only trigger for files inside ~/etc/nixos~, and for there to be no template in other cases. We'll also add a template for flakes.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(set-file-templates!
|
||||
'(nix-mode :remove t)
|
||||
'("/etc/nixos/.*\\.nix$" :mode nix-mode)
|
||||
'("/flake\\.nix$" :trigger "__flake.nix" :mode nix-mode))
|
||||
#+end_src
|
||||
|
||||
** Spell Checking
|
||||
|
||||
#+call: confpkg("Pkg: ispell")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue