AdGuard Home `services.adguardhome.enabled` does not exist

I’m pretty new to NixOS so I’m trying to learn how to set up something simple like AdGuard Home.

I added the following lines to my /etc/nixos/configuration.nix file.

services.adguardhome = {
  enabled = true;
  mutableSettings = true;
  allowDHCP = false;
  openFirewall = true;
  settings.bind_port = 8000;

I’m on NixOs 23.11 (I think, because I see system.stateVersion = "23.11"; in my config).

I am referencing services.adguardhome - MyNixOS to find these config options.

When I run sudo nixos-rebuild switch I get the following error:

The option `services.adguardhome.enabled` does not exist.

Any ideas why this is not working? As far as I can tell, I am on the correct version and this option should exist in 23.11.

It’s ‘enable’, not ‘enabled’

oh and stateVersion is not your nixos version, you can get that by running

From the (unofficial nixos wiki) FAQ about what stateVersion is:

The system.stateVersion option is described as such:
Every once in a while, a new NixOS release may change configuration defaults in a way incompatible with stateful data. For instance, if the default version of PostgreSQL changes, the new version will probably be unable to read your existing databases. To prevent such breakage, you can set the value of this option to the NixOS release with which you want to be compatible. The effect is that NixOS will option defaults corresponding to the specified release (such as using an older version of PostgreSQL).

1 Like