Is there any default template to easily create NixOS configs?
In my opinion the true NixOS config must follow next principles:
- Use pinned (in git) version of
nixpgsin some way. With git submodule or fetch.json file.
- Ability to install packages from multiple versions of
nixpkgsin same environment. For example install all packages from stable branch but the
masterbecause of new features.
- No use of nix-env. All packages must be installed from config
- Support of multiple devices. One repository must be able to contain configuration code for multiple devices. For example user may have a home server, a desktop and a laptop. All devices use same configuration repository with small (or big) differences. For example the server must not have X11 installed, but have DHCP and DNS servers installed and configured. The desktop has X11, dev tools and games. The laptop is like the desktop but with no games. The laptop and the desktop share same set of users with same passwords.
- Easy overlays. With script or template to create a new one.
- Immutable users by default.
- Some way to safely manage secrets (immutable users passwords, hardware configuration) by default.
- Maybe some scripts to automatically update all pinned versions of
- Maybe use the
home-managerby default? I’ve never used it, but dudes say it is cool replacement for the
users.users.userName.packageswith ability to manage configurations in the home dir.
So the question is: is there any template for NixOS configs following above principles?
Like, I fork it on GH, then enter my own packages set, my secrets, my overlays, my tools configurations and other stuff, and that’s it. I have ready to use fully featured easily supportable the true NixOS config.