forked from mirrors/nixpkgs
Set the domain name of the machine
The domain name was not being set before, even if the administrator properly configured the networking.domain option in /etc/nixos/configuration.nix.
This commit is contained in:
parent
f60393975f
commit
7f9fc8d817
|
@ -424,13 +424,17 @@ in
|
|||
// mapAttrs createBridgeDevice cfg.bridges
|
||||
// { "network-setup" = networkSetup; };
|
||||
|
||||
# Set the host name in the activation script. Don't clear it if
|
||||
# it's not configured in the NixOS configuration, since it may
|
||||
# have been set by dhclient in the meantime.
|
||||
# Set the host and domain names in the activation script. Don't
|
||||
# clear it if it's not configured in the NixOS configuration,
|
||||
# since it may have been set by dhclient in the meantime.
|
||||
system.activationScripts.hostname =
|
||||
optionalString (config.networking.hostName != "") ''
|
||||
hostname "${config.networking.hostName}"
|
||||
'';
|
||||
system.activationScripts.domain =
|
||||
optionalString (config.networking.domain != "") ''
|
||||
domainname "${config.networking.domain}"
|
||||
'';
|
||||
|
||||
services.udev.extraRules =
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue