Skip to main content
  1. ZaneyOS Documentation/
  2. ZaneyOS 2.3 Documentation/

How The Config Files Work

2 mins· 0 · 0 · ·
Zaney
Docs NixOS ZaneyOS
Table of Contents
ZaneyOS 2.3 Docs - This article is part of a series.
Part 2: This Article

The way the files are structured is quite simple. The repository top level has the Gitlab specific files and flake(.nix and .lock) files, the hosts folder for separate host configurations, the modules folder which has the core folder for system configuration and the home folder for home manager configuration. That means we have the normal configuration files, mine are just shortened names such as hardware.nix instead of hardware-configuration.nix down in the hosts/<your-hostname> folder.

The flake.nix file has variables for hostname, username, and profile. These are all used to setup the system correctly. Your profile ensures graphics settings/drivers are setup.

Here is how the files all get imported:

flake.nix > profiles/(the profile selected) > hosts/(hostname spefified) > modules/core/(the user.nix sets up homemanager and imports) > modules/home/

Below you’ll see the file structure:

├── hosts
│   └── default
│       ├── hardware.nix
│       ├── host-packages.nix
│       ├── variables.nix
│       └── ...
├── modules
│   ├── core
│   │   ├── default.nix
│   │   ├── packages.nix
│   │   └── ...
│   ├── home
│   │   ├── default.nix
│   │   ├── kitty.nix
│   │   └── ...
│   └── ...
├── profiles
│   ├── amd
│   ├── nvidia
│   └── ...
├── flake.nix
├── flake.lock
├── README.md
└── ...

🖋️ Why Have Config Files In Different Syntax!? #

Having the configuration files as a .nix file allows me to use the Nix language to generate the actual desired config file. This allows me to use Stylix, a phenomenal tool in NixOS, to define a colorscheme and let the user change the theme and have all the programs change upon rebuild. Even GTK applications change too!

ZaneyOS 2.3 Docs - This article is part of a series.
Part 2: This Article

Related

Frequently Asked Questions
8 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
How To Install ZaneyOS
2 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
How To Theme & Use ZaneyOS
3 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
My NixOS Configuration: ZaneyOS Explained
5 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
How The Config Files Work
2 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
ZaneyOS 2.2 Documentation
9 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS