Caution
⚠️ Caution: Modifying the file
/etc/nixos/customConfig/default.nixis at your own risk. Only do so if you know what you are doing! ⚠️
GLF-OS provides a space to add your custom configurations in /etc/nixos/customConfig/default.nix
If the current configuration and flatpaks do not fully meet your needs, you can modify the configuration.
Note
Please note that you can find a large number of applications at the following link:
https://search.nixos.org/packages
Here is a practical example: we are going to add Google Chrome.
The option to install Google Chrome is pkgs.google-chrome, which can be found here : https://search.nixos.org/packages?channel=25.05&from=0&size=50&sort=relevance&type=packages&query=google-chrome
/etc/nixos/customConfig/default.nix. The Gnome Text Editor tool will do the job.pkgs.google-chrome below the comment # Add your stable apps here (example: pkgs.btop){
lib,
config,
pkgs,
pkgs-unstable,
...
}:
{
environment.systemPackages = [
# Add your stable apps here (exemple: pkgs.btop)
pkgs.google-chrome
# Add your unstable apps here (exemple: pkgs-unstable.btop)
];
# Add your custom configuration here ↓
}
CTRL+S; you will be asked for the root password.glf-update
If you now want to open specific ports in the firewall, this is done in the configuration section of the same file /etc/nixos/customConfig/default.nix.
{
lib,
config,
pkgs,
pkgs-unstable,
...
}:
{
environment.systemPackages = [
# Add your stable apps here (exemple: pkgs.btop)
pkgs.google-chrome
# Add your unstable apps here (exemple: pkgs-unstable.btop)
];
# Add your custom configuration here ↓
networking.firewall.allowedTCPPortRanges = [
{ from = 51413; to = 51413; }
];
}
Save your file with CTRL+S, and you will be prompted for the root password.
Run the command:
glf-update
Reboot your machine
This is the most useful notion on this page, and it explains every example below.
NixOS does not read your file "after" ours in order to overwrite it: it merges them. What happens depends on the option type.
| Option type | What happens |
|---|---|
| A list | your entries are added to ours, nothing is lost |
| A simple value (boolean, string, package) | conflict if we already set it, lib.mkForce is required |
Note
You have nothing to remove on our side: your list is added to ours.
Take OBS Studio. GLF already declares four plugins, and adds more depending on your graphics card. To add your own, simply declare the list in your file:
{
# Add your custom configuration here ↓
programs.obs-studio.plugins = with pkgs.obs-studio-plugins; [
obs-backgroundremoval
obs-shaderfilter
input-overlay
];
}
Caution
Three pitfalls to avoid:
- do not redeclare
enableorpackage, we already set them. Declaringpackagewould conflict with our CUDA variant enabled on NVIDIA cards- the prefix is
pkgs.obs-studio-plugins., notpkgs.: OBS plugins live in their own set- a plugin is tied to the OBS version. A plugin built for another version will not load
The same reasoning applies to Steam, whose compatibility tools we already populate. To add utilities to its environment:
{
programs.steam.extraPackages = [
pkgs.steamtinkerlaunch
pkgs.protontricks
];
}
Here merging is not enough: two simple values conflict and evaluation fails. lib.mkForce settles it in your favour.
{
fonts.fontconfig.defaultFonts.monospace = lib.mkForce [ "JetBrainsMono Nerd Font" ];
}
Note
Without
lib.mkForceyou will get an error such as "The option has conflicting definition values". That message does not mean you did something wrong: it simply asks you to say which definition wins.
Each major component exposes a switch, already listed as a comment in your file:
{
glf.firefox.enable = lib.mkForce false; # remove Firefox
glf.gaming.enable = lib.mkForce false; # remove the whole gaming pack
glf.printing.enable = lib.mkForce false; # remove printing
}
Note
For individual applications, prefer GLF Customizer: it writes to a file meant for that purpose and avoids conflicts.
When no option exists, act on the package.
{
environment.systemPackages = [
(pkgs.mpv.override { scripts = [ pkgs.mpvScripts.mpris ]; })
];
}
Caution
The package no longer matches the one in the binary cache, so it will be rebuilt on your machine. Plan for the time it takes.
nix search nixpkgs obs-studio-pluginsnixos-option programs.obs-studio.pluginsmkForce: why and how to settle a conflictoverride and overrideAttrsNote
A failed evaluation installs nothing: your system stays exactly as it was. You cannot break it by trying.
If a boot goes wrong after a change, pick the previous generation in the boot menu, it is always there.
To roll back without rebooting:
sudo nixos-rebuild switch --rollback
© 2025 GLF