In Chapter 6, you noted that
|
Before we start, I want to make something clear: in the long run, you actually |
|
probably won't use this very often. You'll want to prefer using specific |
|
configuration options that will generate config files, or using other |
|
functionality to build shell scripts, etc. However, it's very easy to get |
|
started with this, and it can be useful for sketching out some ideas or just |
|
getting a file somewhere that you want it. Mostly it's a great excuse to show |
|
you some more new syntax. |
and
|
_Again, this is NOT actually the long term solution you want for writing your |
|
own utility scripts. The long term solution you want is probably |
|
[`writeShellApplication`](https://ryantm.github.io/nixpkgs/builders/trivial-builders/#trivial-builder-writeShellApplication) |
|
in nixpkgs, which is available in `pkgs.writeShellApplication`. This requires |
|
some significant extra work and understanding, so bookmark this later and return |
|
to it once you're more comfortable with Nix generally. If you want a taste of |
|
what this might look like, [here's what I do to generate a bunch of helpful |
|
wrapper scripts in my own setup](https://github.com/Evertras/nix-systems/blob/main/home/modules/shell/funcs/default.nix)._ |
But why? Sure, using modules like https://github.com/nix-community/nixvim is more "elegant" than copying and pasting ~/.config/nvim/init.lua from an existing system, but the latter is at least as expressive as the former, and requires essentially zero effort. Is there any practical advantage besides aesthetics?
In Chapter 6, you noted that
simple-homemanager/06-explain-home-nix.md
Lines 174 to 180 in 8e19b99
and
simple-homemanager/06-explain-home-nix.md
Lines 248 to 255 in 8e19b99
But why? Sure, using modules like https://github.com/nix-community/nixvim is more "elegant" than copying and pasting
~/.config/nvim/init.luafrom an existing system, but the latter is at least as expressive as the former, and requires essentially zero effort. Is there any practical advantage besides aesthetics?