Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Ladas552/Nix-Is-Unbreakable

Repository files navigation

nix

Why archived?

During my migration to flake-parts, I revamped the whole repo, so for people who like this config structure, but don't like flake-parts I archive this repository.

Here is the flake-parts repo: https://github.com/Ladas552/Flake-Ocean

What is this?

This is my multi host, modular Nix config. It declares configs for different programs using Nix language, such as:

I also declare configuration as packages that you can try with nix run github:Ladas552/Nix-Is-Unbreakable#app, replace app with:

Overview of things to note

Hosts

  • 2 NixOS hosts with Nvidia and Intel, and AMD APU on laptops. Both on ZFS and NixPort is using Impermanence
  • Nix-On-Droid on phone, even if unmantained, it still works
  • NixOS-WSL for Windows partition
  • NixVM for testing, you shouldn't use it unless testing breaking changes
  • NixIso for my portable NixOS image

Modular

Config is modular in a way that depending on host, the changes for programs can change. Like For FullHD screen and 4K screen - font size is 13 and 11 respectively. This is dependent on meta attribute, which is inherited by all modules, even standalone ones.

Which makes my Nix Packages interchangeable depending on the host they are running under. meta is declared in flake.nix as a boilerplate and in each individual host as a specialty.

Also, you don't need to add imports to hosts, just custom.helix.enable = true; to download the package and a config for any individual host. More info on this structure in Vimjoyer's Video

Overlays

I declare overlays in Overlays file. They change and add stuff to the main nixpkgs, like adding custom prefixes to scripts, or defining neovim-nightly.

Docs

I write comments on things, that might explain certain ways of doing things, or leave not working options in comments for people to find. This is to not look up one thing twice, and just look at the nix file itself.

Also, I have Norg document, containing notes and TODO for the config, and folder /docs for containing more specific instructions.

I plan on writing Impermanence guide at https://ladas552.me/categories/nix/ So stay tuned

Directory structure

flowchart TD
    flake[flake] --> A[docs]
    flake --> C[homeModules]
    flake --> F[hosts]
    flake --> N[nixosModules]
    flake --> R[overlays]
    flake --> T[pkgs]
    flake --> V[secrets]
    flake --> Z[templates]

    A -->|norg files with information| B[storage]
    C -->|directories containing config files| D[pkgs]
    C -->|importing all home-manager modules| E[default.nix]
    F --> G[all-my-hosts]
    G -->|custom iso for reinstalling| H[NixIso]
    G -->|nix-on-droid config| I[NixMux]
    G -->|acer laptop| J[NixPort]
    G -->|server| K[NixToks]
    G -->|experimenting host| L[NixVM]
    G -->|wsl for windows| M[NixWSL]
    N -->|importing all NixOS modules| O[default.nix]
    N -->|graphical sessions and WMs| P[Desktops]
    N -->|homelab specific modules| X[Server]
    N -->|virtual containers| Y[Virtualisation]
    N -->|all other modules| Q[other modules]
    R -->|overlaying nixpkgs and applying patches| S[patches]
    T -->|scripts and neovim configs| U[derivations]
    V -->|try to decrypt it| W{secrets.yaml}
    Z -->|flake templates for projects| ZZ{flakes}
Loading

Name

Yes, it is a JoJo's reference

Credits

I take a lot of things from the internet and different configs too. So I credit people in comments to snippets that I stole.

If you want to check every person that I stole things from, go to my List of configs

Also for that one guy who switched to codeberg

Also, thanks to everyone in nix-community for being so awesome, wouldn't be there without ya

About

My NixOS config Part 2: Config Tendency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages