Per host configuration #68
-
Would you mind expanding on how to implement per host configurations? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, In designing this configuration, I made a tradeoff to not create per host configuration as I felt, at the time, reading other configurations was difficult as they were per host with many small module files. So I wanted to make something more obvious, with Mac-specific and NixOS-specific code broken out into their own directories, filenames like So it's currently limited to one machine of each platform type. I have a home lab server at home, but instead of adopting this configuration, I'll likely just maintain of fork of this repository for it. Here's how the code works:
This line:
says Run the Here is our list of strings,
So the So
This makes two hosts available by their platform name. When you run the build process, the scripts look for the platform by name. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Thank you for the explanation - I will try and tweak! |
Beta Was this translation helpful? Give feedback.
Hi,
In designing this configuration, I made a tradeoff to not create per host configuration as I felt, at the time, reading other configurations was difficult as they were per host with many small module files.
So I wanted to make something more obvious, with Mac-specific and NixOS-specific code broken out into their own directories, filenames like
packages,
files,
homebrew,
etc, to denote clearly what's going on. Optimize for learnability over a more canonical configuration.So it's currently limited to one machine of each platform type. I have a home lab server at home, but instead of adopting this configuration, I'll likely just maintain of fork of this repository for it.
Here's how th…