🚀 add option to enable resolved

I recently had problems with resolving dns entries. This is in case I
need a quick fix;
nixos
Moritz Böhme 2022-02-09 14:12:15 +01:00
parent 69d5aca908
commit b2fac916b4
No known key found for this signature in database
GPG Key ID: 213820E2795F5CF5
1 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ lib, config, pkgs, ... }:
{
imports = [
@ -33,8 +33,13 @@
nameservers = [ "192.168.0.4" ];
useDHCP = false;
interfaces.enp42s0.useDHCP = true;
networkmanager.enable = true;
networkmanager = {
enable = true;
dns = lib.mkIf (config.services.resolved.enable) "systemd-resolved";
};
};
services.resolved.enable = lib.mkDefault false;
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.xrandrHeads = [