Merge pull request #167 from wizeman/domain

Set the domain name of the machine
This commit is contained in:
Evgeny Egorochkin 2013-05-30 09:14:25 -07:00
commit 3bb97667b8

View File

@ -424,13 +424,17 @@ in
// mapAttrs createBridgeDevice cfg.bridges // mapAttrs createBridgeDevice cfg.bridges
// { "network-setup" = networkSetup; }; // { "network-setup" = networkSetup; };
# Set the host name in the activation script. Don't clear it if # Set the host and domain names in the activation script. Don't
# it's not configured in the NixOS configuration, since it may # clear it if it's not configured in the NixOS configuration,
# have been set by dhclient in the meantime. # since it may have been set by dhclient in the meantime.
system.activationScripts.hostname = system.activationScripts.hostname =
optionalString (config.networking.hostName != "") '' optionalString (config.networking.hostName != "") ''
hostname "${config.networking.hostName}" hostname "${config.networking.hostName}"
''; '';
system.activationScripts.domain =
optionalString (config.networking.domain != "") ''
domainname "${config.networking.domain}"
'';
services.udev.extraRules = services.udev.extraRules =
'' ''