NotAShelf / nyx

My overengineered NixOS flake. Desktops, laptops, servers and everything else that can run an OS.
GNU General Public License v3.0
331 stars 8 forks source link
dotfiles nix nix-flake nixos nixos-configuration starship zsh


Nýx

[!NOTE] This repository, as of 5th of August 2024, has been abandoned. I will no longer be maintaining my system configuration in a public location. I am leaving this repository at its latest state at the time of removal for your convenience, as I owe it to many people in the Nix community, however, I will not provide support of any kind. If you are curious about why I have decided to archive this repository, please read the commit message.

Special thanks to everyone who was nice enough to adhere to my license. Countless hours (it's far past the hundreds of hours range) has been poured in this repository in the hopes of making a good public resource, however, it is apparently very hard for some people to understand the value of credit in open source. While I'm not going to name any names, some of you will know who it is. Because it's quite obvious despite what they may think.

You can go through the thousands of lines of Nix I've written, borrow what you need. I would appreciate the credit (it's really not too hard to give) but at this point I do not care. Keep in mind that things may be broken because 1. this is a personal configuration and 2. it is abandoned but I expect fully copy-pasted sections in typical NixOS fashion.

So long, and thanks for all the fish.

My over-engineered NixOS flake: Desktops, laptops, servers and everything else that can run an OS.

Preface
Overview | Hosts | Installation
Credits | License
Helpful Resources


Desktop Preview
Screenshot last updated 2024-03-19

Preface

Before you proceed, I would like to direct your attention to the credits section below, where I pay tribute to the individuals who have contributed to this project. Whether through code references, suggestions, bug reports, or simply moral support, they have my most sincere gratitude.

Disclaimer

[!CAUTION] As I constantly tinker and adjust my configuration, nothing in this repository (including the README and overview sections) should be considered final. Expect frequent changes, possibly on a daily basis, and quite likely in a half-broken state. This is my personal configuration, not a framework, so I make no promises of stability or support. If something breaks, it will be your responsibility.

It is also worth noting that almost all configurations in this repository contain age-encrypted secrets. This means they cannot be built or replicated successfully unless you know how to revert age encryption. If you do, please let me know!

There is a resources section that I strongly encourage you to check out, which you can use to start building your own configuration. I also document some of my experiences in my nix blog for your convenience. Feel free to dissect this configuration and borrow bits that interest you, but please respect my license while doing so!

Do not be fooled by the extensive documentation effort that has gone into this project. I invite you to explore the modules and countless lines of Nix I have written, but I strongly advise against attempting to boot any of these configurations unless you are me.

To reiterate: this is not a public framework, and you should not try to run this configuration, or rip off specific bits. It will cause you much pain and suffering, in addition to robbing you of the joys of learning something by yourself. By copying me, you would have to learn my specific design choices on top of Nix/NixOS, whereas you could create something that suits your own needs in a shorter time span.

High Level Overview

This is a high level overview of this monorepo, containing configurations for all of my machines that are currently running NixOS, or have ran NixOS at some point in time. You will find below a list of my hosts and their specifications, accompanied by a somewhat maintained list of features of this configuration and my design considerations.

Repo Structure

Notable Features

Rules/Design Considerations

Most of those rules, so to speak, are quite obvious. However they are noted down as a favor to potential contributors, and to potential observers who wish to make sense of certain decisions that are made.

[!NOTE] Notes on host-specific design rules and considerations have been moved to the hosts directory.

Goals/Non-goals

Goals

I have a bunch of goals that I wish to accomplish by, and while working on this repository. Those goals are:

Non-goals

Host Specifications

[!WARNING] This section may be out of date as I constantly add, remove or re-purpose my hosts across a single network. Hostnames are assigned on a per-host basiis and are permanent, type and arch on another hand are subject to change.

Name Description Type Arch
enyo Day-to-day desktop workstation boasting a full AMD system. Desktop x86_64-linux
prometheus HP Pavilion with a a GTX 1050 and i7-7700hq Laptop x86_64-linux
epimetheus Twin of prometheus, features full disk encryption in addition to everything prometheus provides Laptop x86_64-linux
hermes HP Pavilion with a Ryzen 7 7730U, and my main portable workstation. Used on-the-go Laptop x86_64-linux
icarus My 2014 Lenovo Yoga Ideapad that acts as a portable server, used for testing hardware limitations Laptop x86_64-linux
helios Hetzner Cloud VPS for non-critical infrastructure Server x86_64-linux
selene Alternative Hetzner Cloud VPS to be used as an aarch64-linux builder Server aarch64-linux
atlas Proof of concept server host that is used by my Raspberry Pi 400 Server aarch64-linux
artemis VM host for testing basic NixOS concepts. Previously targeted aarch64-linux VM x86_64-linux
apollon VM host for testing networked services, generally used on servers VM x86_64-linux
leto VM host running medium-priority infrastructure inside a virtualized root server VM x86_64-linux
gaea Custom live media, used as an installer ISO x86_64-linux
erebus Air-gapped virtual machine/live-iso configuration for sensitive jobs ISO x86_64-linux

Credits & Special Thanks

My most sincere thanks go to @fufexan for convincing me to use NixOS and sticking around to answer my most stupid and deranged questions, as well as my atrocious abstractions. Without his help, I would not be able to stand where I do.

I also wish to extend my thanks to @sioodmy which my configuration was initially based on. Though layouts and files have since changed, the core principals and ideas remain. The simplicity of his configuration flake allowed me to take a foothold in the Nix world.

Last but not least, I thank @NobbZ and @tejing1 for their endless patience, critique and willingness to show around the Nix ecosystem when I needed it the most. Many pitfalls were avoided with their help, and many steps were taken forward with their assistance.

Awesome People

I got inspired by, and owe a lot to those folks

sioodmy - fufexan - NobbZ - ViperML - spikespaz - hlissner - Max Headroom - Lily Foster

... and surely there are more, but I tend to forget. Nevertheless, I extend my thanks to all of those people and any others that I might have forgotten.

Anti-credits

Pretend I haven't credited those people (but I will, because they are equally awesome and I appreciate them)

gerg-l (bald frog) - eclairevoyant - FrothyMarrow - adamcstephens - nrabulinski -

Honorable Mentions

Some of the cool people I have interacted with in the past and believe deserve a shoutout for their support or companionship. I appreciate you all. :)

The wires gang

fsnkty - lychee - germanbread - marshmallow - Zacc - Michaili - Sako

Hyprland Community

vaxry - Vagahbond - jacekpoz - Raidenovich - n3oney -

Cool Resources

Resource that helped shape and improve this configuration, or resources that I strongly recommend that you read in no particular order. Note that reading any of those resources would be preferable to going through my config to learn.

Official Manuals

As silly as manuals split over three different pages may sound, I encourage everyone (including experts) to read those for comprehensive notes on packaging, program specific quirks & overrides and other "pro-tips" on Nix, Nixpkgs and NixOS.

You are invited to read about the module system in the NixOS manual before you look into your own NixOS configuration.

Interactive Pages

Readings

Blogs

Likely opinionated blog resources on Nix or Nix-centric processes. Nix knowledge is best transferred via blogs on personal experience.

Guides & Other Resources

Additional resources that you might want to check out before you begin your Nix journey properly.

Software

Software that helped this configuration become what it is, or software I find interesting

Linux

Nix/NixOS

Projects I have made to use in this repository, or otherwise cool software that are used in this repository that I have contributed to, or would like to endorse.

Additionally, take a look at my personal blog for my notes on Linux, and specifically challenging or tedious processes on Nix and NixOS. Some of my notes have also been left in the docs directory.

License

Unless explicitly stated otherwise, all code and documentation found within in this repository is licensed under the GPLv3, or should you prefer, under any later version of the GPL released by the FSF. Documentation and any "creative" writing found in Markdown pages remain under the CC BY License.

The licenses entail that you must include a copyright notice inside your repository, and disclose changes where applicable.

All code here (excluding secrets) are available for your convenience and at my own expense as I choose to keep my entire system configuration public. I believe it is in Nix and NixOS community spirit to learn from and share code with other NixOS users. As such if you are directly copying a section of my configuration, please include a copyright notice at the top of the file you import the code, or as a small comment above the section you have copied.

I cannot, in any shape or form enforce my license on you, but I would like you to know that I really appreciate those who are kind enough to leave a link to my configuration and uphold my license properly. Please do not be one of those people who copy my commits without proper credit, as it is the only thing I can ask for my efforts. Those who were kind and diligent enough to follow my license, a very big thank you.

Back to the Top

[^1]: I speak of "over-engineering" not as a flaw, but as a trait that can properly describe the time and effort that this repository has taken. After 700+ recorded hours and 4500+ commits, that is the only word that can describe this project.