diff options
| author | Adam Curtis <adam.curtis.dev@gmail.com> | 2024-01-19 12:16:32 -0500 |
|---|---|---|
| committer | Adam Curtis <adam.curtis.dev@gmail.com> | 2024-01-19 12:16:32 -0500 |
| commit | 5cec74dae1bf439a3d137152e77badc7214ddc7c (patch) | |
| tree | d9e98e6be21df865eba35708768c6377a26d45f0 /tests | |
| parent | 74ab0227ee495e526f2dd57ea684b34f6396445a (diff) | |
fix shell escaping in networking config
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/networking-shell-escape.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/networking-shell-escape.nix b/tests/networking-shell-escape.nix new file mode 100644 index 0000000..da399b1 --- /dev/null +++ b/tests/networking-shell-escape.nix @@ -0,0 +1,15 @@ + +{ config, pkgs, ... }: + +{ + networking.computerName = "\"Quotey McQuote's Macbook Pro\""; + networking.hostName = "\"Quotey-McQuote's-Macbook-Pro\""; + + test = '' + echo checking hostname in /activate >&2 + grep "scutil --set ComputerName '"\""Quotey McQuote's Macbook Pro"\""'" ${config.out}/activate + grep "scutil --set LocalHostName '"\""Quotey-McQuote's-Macbook-Pro"\""'" ${config.out}/activate + grep "scutil --set HostName "'"\""Quotey-McQuote's-Macbook-Pro"\""'" ${config.out}/activate + echo checking defaults write in ${config.out}/activate-user >&2 + ''; +} |
