Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: The option `services.dnsmasq' does not exist. #2670

Closed
1 task done
shirakaba opened this issue Jan 28, 2022 · 2 comments
Closed
1 task done

bug: The option `services.dnsmasq' does not exist. #2670

shirakaba opened this issue Jan 28, 2022 · 2 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@shirakaba
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Given this Home Manager config:

{ config, pkgs, ... }:

let
  homeDirectory = "/Users/jwork";
in
# https://nix-community.github.io/home-manager/options.html
{
  home.username = "jamie";
  home.homeDirectory = homeDirectory;

  # https://search.nixos.org/packages?channel=unstable
  home.packages = [
    pkgs.dnsmasq
  ];
  services.dnsmasq = {
    enable = false;
  };
  home.stateVersion = "22.05";
  programs.home-manager.enable = true;
}

... It says that services.dnsmasq does not exist, despite my having seen it used by other people on NixOS:

NixOS/nixpkgs#104181
NixOS/nixpkgs#27504
NixOS/nixpkgs#20863

➜  ~ home-manager switch
error: The option `services.dnsmasq' does not exist. Definition values:
       - In `/Users/jwork/Documents/git/nixpkgs/home.nix':
           {
             dnsmasq = {
               enable = false;
             };
           }

Am I misunderstanding something about home-manager? How should I configure dnsmasq through home-manager if not this?

Maintainer CC

@eelco
@fpletz
@globin

System information

nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.2.0, macOS 12.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.4`
 - channels(jamie): `"home-manager"`
 - channels(root): `"nixpkgs-22.05pre337993.e6df26a654b"`
 - channels(jwork): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
@shirakaba shirakaba added bug triage Issues or feature request that have not been triaged yet labels Jan 28, 2022
@shirakaba shirakaba changed the title bug: The option `systemd.services' does not exist. bug: The option `services.dnsmasq' does not exist. Jan 28, 2022
@anubhavkini
Copy link

anubhavkini commented Jan 28, 2022

Am I misunderstanding something about home-manager?

home-manager is designed for configuring user environments and not system services like dnsmasq.

... It says that services.dnsmasq does not exist, despite my having seen it used by other people on NixOS:
NixOS/nixpkgs#104181
NixOS/nixpkgs#27504
NixOS/nixpkgs#20863

These are NixOS system configurations and not home-manager configurations.

How should I configure dnsmasq through home-manager if not this?

It should be possible for you to configure dnsmasq through nix-darwin on macOS.

@rycee
Copy link
Member

rycee commented Jan 28, 2022

Indeed, as @anubhavkini said. It is not possible to configure dnsmasq or other system level services through Home Manager.

@rycee rycee closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

5 participants