diff options
Diffstat (limited to 'modules/networking/default.nix')
| -rw-r--r-- | modules/networking/default.nix | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/modules/networking/default.nix b/modules/networking/default.nix index 0eed284..e45199e 100644 --- a/modules/networking/default.nix +++ b/modules/networking/default.nix @@ -3,34 +3,29 @@ with lib; let - cfg = config.networking; hostName = optionalString (cfg.hostName != null) '' scutil --set ComputerName '${cfg.hostName}' scutil --set LocalHostName '${cfg.hostName}' scutil --set HostName '${cfg.hostName}' - defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string '${cfg.hostName}' ''; - in { options = { - networking.hostName = mkOption { type = types.nullOr types.str; default = null; example = "myhostname"; - description = '' - Hostname for your machine. - ''; + description = "Hostname for your machine."; }; - }; config = { + system.defaults.smb.NetBIOSName = cfg.hostName; + system.activationScripts.networking.text = '' # Set defaults echo "configuring networking..." >&2 |
