This is my NixOS config as a link:https://www.tweag.io/blog/2020-05-25-flakes/[Nix flake] eventually containing my (almost) complete setup from a desktop, to a server, to a personalized installer, almost everything.
* Deploy the same NixOS configuration for more than one system and in multiple output images.
This is configured in link:./configs/flake-parts/nixos.nix[`./configs/flake-parts/nixos.nix`] where not only you can deploy them with https://github.com/serokell/deploy-rs[deploy-rs] but build them as generated by https://github.com/nix-community/nixos-generators[nixos-generators].
This time, it is configured with the link:./configs/flake-parts/home-manager.nix[./configs/flake-parts/home-manager.nix] file which you can configure what nixpkgs branch it will use.
* Unify https://github.com/nix-community/nixos-generators[home-manager] and NixOS configuration (and maybe other environments such as nix-darwin and system-manager in case I have use cases for those) into one flake.
* Take full advantage of Nix module system with the cluster-wide custom modules footnote:[Most of them are patterned similarly from nixpkgs which made easy to be upstreamed just in case.].
This design bleeds into configuring the NixOS systems and home-manager users by designing https://foo-dogsquared.github.io/nixos-config/04-nixos-modules/04-host-specific-modules/[host-specific modules] and https://foo-dogsquared.github.io/nixos-config/05-home-manager/#_user_specific_modules[user-specific modules], respectively.
Anyways, this project also has a dedicated website at {doc_site} which I recommend to take a gander on how this project structures its configuration (and much of the information is not covered in this README anyways).
If you want the local documentation and has angst against online documentation, you can view the source code of the book at link:./docs/[`./docs/`].
To start, you'll have to download a NixOS installer image.
While you can download link:https://releases.nixos.org/?prefix=nixos/unstable/[the latest revisions from the official website], you can get my personalized installer from link:https://github.com/foo-dogsquared/nixos-config/releases/tag/latest[the releases page of this project].
Next, boot into the installer image.
Then as root, install the desktop with the following commands.
However, it should also be barely usable since there are a couple of missing components that are needed such as the private keys for the desktop which is required for certain tasks such as backup task with Borg among other things.
For a better experience, I recommend using https://flakehub.com/flake/foo-dogsquared/nixos-config[FlakeHub] (with available instructions in the linked page).
The FlakeHub flake follows a rolling release model so all of the releases are under 0.x.
If you're one of the unfortunate users for whatever reason, sorry but there's no stability promise here.
Not every commit successfully builds because of the way how the project is managed (which is very very badly):
* All of the included changes are pushed in one fell swoop over time instead of carefully testing each of them.
* NixOS and home-manager configurations are able to be deployed in pure evaluation mode and suddenly it's not (most of the time, it isn't).
* Module interfaces change all the time.
* Packages can be left unmaintained and vanish at any time. footnote:[The ones I actively maintain are in nixpkgs anyways.]
This is my personal NixOS configuration, after all.
It serves more of a platform to experiment with the Nix ecosystem rather than something that it's meant to be used by others.
There are some parts of the configuration that eventually sprung as its own project such as the https://github.com/foo-dogsquared/nix-overlay-guix[Guix overlay] (which eventually upstreamed into nixpkgs, hoorah!).
Hopefully, more of them can be like that in the future (provided I still use Nix and have some time for it).
* [x] Make use of other established utilities such as link:https://github.com/divnix/digga/[digga], link:https://github.com/gytis-ivaskevicius/flake-utils-plus[flake-utils-plus], and link:https://github.com/nix-community/home-manager[home-manager] once I'm familiar to create my own Nix programs.
I just chose it to make it easier to upstream parts of this project to nixpkgs and to make it easier to copy it without much problems (just don't forget to add attribution as indicated from the license).
Please see link:./LICENSE[`./LICENSE`] for the full text.