Skip to main content
  1. ZaneyOS 1.0 Documentation/

How The Config Files Work

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

The way the files are structured is quite simple. The repository top level has the Gitlab specific files as well as the normal nix files that are responsible for modular imports. That means we have the normal configuration files, mine are just shortened names such as system.nix instead of configuration.nix.

Below you’ll see the file structure:

├── config
│   ├── home
│   │   ├── bash.nix
│   │   ├── default.nix
│   │   ├── hyprland.nix
│   │   ├── files.nix
│   │   ├── files
│   │   │   ├── base16-themes
│   │   │   ├── emoji
│   │   │   └── starship.toml
│   │   └── ...
│   ├── system
│   │   ├── boot.nix
│   │   ├── default.nix
│   │   ├── displaymanager.nix
│   │   ├── packages.nix
│   │   └── ...
│   ├── scripts
│   │   ├── emopicker9000.nix
│   │   ├── wallsetter.nix
│   │   └── ...
│   └── pkgs
│       ├── sddm-sugar-dark.nix
│       └── ...
├── flake.nix
├── flake.lock
├── home.nix
├── hosts
│   └── default
│       ├── hardware.nix
│       └── options.nix
|── options.nix
├── system.nix
├── README.md
└── ...

🗄️ How Files Get Imported #

I am using Home Manager, as a module, this is where a lot of the configuration for stuff is. As most things for theming are in user space you’ll want to look for Home Manager Options to see what you have available. To keep the home.nix from getting too large some of the configuration is split into separate files that home.nix imports. Those files are stored in the folder config/home and because the home.nix imports the folder as shown below there must be a default.nix file that then imports all the individual files in the folder desired.

Home Manager Import config/home Folder

Now I am doing the same thing with the systems configuration too. You’ll see a similar folder config/system that has files for configuring services, specific hardware driver stuff, and more. If you are hunting for the file that is the configuration.nix equivalent it is the system.nix file and the files in config/system.

🖋️ 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 Nix Colors, a phenomenal tool in NixOS, to define a base16 colorscheme and let the user change the theme and have all the programs change upon rebuild. Even GTK applications change too!

Documentation - This article is part of a series.
Part 3: This Article

Related

Commonly Reported Issues
1 min· 0 · 0
Zaney
Docs NixOS ZaneyOS
How Theming Works
1 min· 0 · 0
Zaney
Docs NixOS ZaneyOS
How To Install ZaneyOS
2 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
How To Use ZaneyOS
2 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
My NixOS Configuration: ZaneyOS Explained
5 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS
Setting Options For Flake
4 mins· 0 · 0
Zaney
Docs NixOS ZaneyOS