Nix beginner - is there some way of enabling barebones/minimal packages only? #69
Replies: 1 comment 4 replies
-
Hi, Yes the backstory on this repository is that I was using it as my main configuration for some time, then decided to create templates for others to try. So it's heavily based on what I started with. The vision is that the installer will ask you questions to include the main stuff (what editor, common CLI tools, etc.), then give you resources to add the rest of the packages you want. Haven't had the time to build that yet. Now, on to your questions. Question 1 - Is there some way to easily get a barebones configuration from your config, and then you add/enable the packages you want later on? For the most part, you can remove any line in packages.nix in both If you don't want Question 2 - Is the rationale behind certain packages (e.g. Python 3.9) documented or captured somewhere? Or if you just point me in the rough direction, happy to file a PR with comments (if that's acceptable). Contribution to the README or other documentation would be greatly appreciated. No specific reason for python 3.9; it's just what I was using at that time. You can swap out anything you like and it should work (the beauty of Nix). Question 3 - Is simply uncommenting the package from casks.nix/``packages.nix`, or is there something else? Yep, any line in those files gets imported/installed in the Nix Store. Then Nix creates a symlink to it from where the Mac expects it to be installed on your machine. So it's very easy to add/remove packages, think of like I haven't used the homebrew-cask-versions package, unfortunately, but my experience is I can do most things with this configuration after a little digging. Question 4 - (Would homebrew-cask-versions make sense to be available in the base config? It's pretty useful if you want to have a bit more choice on which versions of casks you install) I'm hesitant to add more dependencies, as that requires more maintenance overall. However, if you get it working for you, it's simple and provides a lot of value, I'd love to consider it. Good luck! |
Beta Was this translation helpful? Give feedback.
-
Firstly - thanks for contributing this!
I've been meaning to learn about this "nix" thing everybody keeps raving on for a while =), and I figured it might be a good way to make my Mac machines easier to bringup/tear down, and less "pet-like".
I'm still very new, so it's possible I'm missing something obvious:
However, I've started following the steps in the README, and at steps 6 and 7., it has a long list of packages:
and also configurations for many packages:
A lot of the packages are undoubtedly very cool, and I would love to discover them all - but it's also quite opinionated, and overwhelming for somebody new to all of this.
Question 1 - Is there some way to easily get a barebones configuration from your config, and then you add/enable the packages you want later on?
(It would be cool if it was just a flag or something, you could enable/disable, but don't know how easy/hard that is in nix).
Also - there aren't comments on the packages - so I'm not sure if removing them will have some unwanted side-effects.
For example, I see here it refers specifically to installing
python39
- I assume there's a specific reason we want Python 3.9 as opposed to the current stable (3.12) right? So I'm unsure if I should remove it or not.Question 2 - Is the rationale behind certain packages (e.g. Python 3.9) documented or captured somewhere? Or if you just point me in the rough direction, happy to file a PR with comments (if that's acceptable).
Also, I did do a rough pass through the
casks.nix
andpackages.nix
files, and uncomment the stuff that seemed optional - however, it seems the configuration (home-manager.nix
x 2) must override those somehow. For example, if I uncomment a package - Nix still seemed to install it anyway - I assume due to dependencies, or possible because the configuration was in one of thehome-manager.nix
files?Question 3 - Is simply uncommenting the package from
casks.nix
/``packages.nix`, or is there something else?And even things like google-chrome, I was hoping to install chrome Canary, using homebrew-cask-versions, but it was unclear how to tap that via nix/home-manager...?
Question 4 - (Would homebrew-cask-versions make sense to be available in the base config? It's pretty useful if you want to have a bit more choice on which versions of casks you install).
Beta Was this translation helpful? Give feedback.
All reactions