1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/tests/networking-hostname.nix

15 lines
501 B
Nix
Raw Normal View History

{ lib, config, pkgs, ... }:
2018-01-04 23:15:11 +00:00
{
networking.hostName = "EVE";
networking.computerName = "EVEs MacBook Pro";
2018-01-04 23:15:11 +00:00
test = ''
echo checking hostname in /activate >&2
grep "scutil --set ComputerName 'EVEs MacBook Pro'" ${config.out}/activate
grep "scutil --set LocalHostName ${lib.escapeShellArg "EVE"}" ${config.out}/activate
grep "scutil --set HostName ${lib.escapeShellArg "EVE"}" ${config.out}/activate
2018-01-04 23:15:11 +00:00
echo checking defaults write in ${config.out}/activate-user >&2
'';
}