diff options
| -rw-r--r-- | modules/networking/default.nix | 1 | ||||
| -rw-r--r-- | release.nix | 1 | ||||
| -rw-r--r-- | tests/networking.nix | 13 |
3 files changed, 15 insertions, 0 deletions
diff --git a/modules/networking/default.nix b/modules/networking/default.nix index 634618e..3840145 100644 --- a/modules/networking/default.nix +++ b/modules/networking/default.nix @@ -10,6 +10,7 @@ let 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 diff --git a/release.nix b/release.nix index af1f506..df35a0b 100644 --- a/release.nix +++ b/release.nix @@ -91,6 +91,7 @@ let tests.environment-path = makeTest ./tests/environment-path.nix; tests.launchd-setenv = makeTest ./tests/launchd-setenv.nix; + tests.networking = makeTest ./tests/networking.nix; tests.services-activate-system = makeTest ./tests/services-activate-system.nix; tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix; tests.system-packages = makeTest ./tests/system-packages.nix; diff --git a/tests/networking.nix b/tests/networking.nix new file mode 100644 index 0000000..35aaaa3 --- /dev/null +++ b/tests/networking.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + networking.hostName = "EVE"; + + test = '' + echo checking hostname write in /activate >&2 + grep 'scutil --set ComputerName "EVE"' ${config.out}/activate + grep 'scutil --set LocalHostName "EVE"' ${config.out}/activate + grep 'scutil --set HostName "EVE"' ${config.out}/activate + grep "defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string 'EVE'" ${config.out}/activate + ''; +} |
