Table of Contents
The way the files are structured is quite simple. The repository top level has the Gitlab specific files as well as the nix files that are responsible for modular imports. I mean that in the since the flake.nix imports the system.nix and the home.nix that then import everything else in config.
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
|── options.nix
├── system.nix
├── README.md
└── ...
I am using home manager that is where all of the main configuration for stuff is, as most things are in user space. All of the configuration files that we have being imported in the home.nix are stored in the folder config/home. You might have noticed something quite different about all of them... They are in a .nix format. These files that are imported by home.nix through default.nix in that folder. In nix when we import a folder instead of specifying specific files, like I'm doing in home.nix, we need a default.nix to import everything else.
Now I am doing the same thing with the systems configuration too. You'll see a similar folder in config called system that has files for configuring services and such. 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 that I have Home Manager managing allows me to have variables passed into them. This allows me to use Nix Colors, a phenomenal tool in NixOS, to define a base16 colorscheme and let the user change it in the flake and have all the programs change upon rebuild.