diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2013-05-21 23:30:24 +0000 |
---|---|---|
committer | Ricardo M. Correia <rcorreia@wizy.org> | 2013-05-28 08:49:14 +0000 |
commit | 7f9fc8d817de86084b08b33b001e96fd12f1ff9c (patch) | |
tree | 749d61192796cfe9b576aa73372c5f9e6133f46f /modules/tasks/network-interfaces.nix | |
parent | f60393975f7c36a5f57330ffa4d1d826706cf64f (diff) | |
download | nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.tar nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.tar.gz nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.tar.bz2 nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.tar.lz nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.tar.xz nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.tar.zst nixpkgs-7f9fc8d817de86084b08b33b001e96fd12f1ff9c.zip |
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.
Diffstat (limited to 'modules/tasks/network-interfaces.nix')
-rw-r--r-- | modules/tasks/network-interfaces.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index cb0d17459ff..d7b1988fe8d 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -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 = '' |