diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-09-17 11:25:37 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-09-17 12:31:58 +0200 |
commit | 29f535761a4fa2dee2be51cee5bc0bd7e8475b5d (patch) | |
tree | 4f74db6d788c31281b4a8860ba5f463f19104e57 /nixos/tests/virtualbox.nix | |
parent | 17f58275a05aba98eb644581d557de5c11e3b962 (diff) | |
download | nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.tar nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.tar.gz nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.tar.bz2 nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.tar.lz nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.tar.xz nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.tar.zst nixpkgs-29f535761a4fa2dee2be51cee5bc0bd7e8475b5d.zip |
tests/virtualbox: Use antiquotes for log sockets.
We're simply using antiquotation, since it's been a while since these got introduced (in Nix 1.7). So we can use them because it makes the code much more readable. As usual, I made sure that I didn't accidentally change something in functionality: $ nix-instantiate nixos/tests/virtualbox.nix ... /nix/store/cldxyrxqvwpqm02cd3lvknnmj4qmblyn-vm-test-run-virtualbox.drv $ git stash pop ... $ nix-instantiate nixos/tests/virtualbox.nix ... /nix/store/cldxyrxqvwpqm02cd3lvknnmj4qmblyn-vm-test-run-virtualbox.drv $ Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/virtualbox.nix')
-rw-r--r-- | nixos/tests/virtualbox.nix | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix index cad1574314e..87c2e25e70b 100644 --- a/nixos/tests/virtualbox.nix +++ b/nixos/tests/virtualbox.nix @@ -171,27 +171,21 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let ]; in { machine = { - systemd.sockets = listToAttrs (singleton { - name = "vboxtestlog-${name}"; - value = { - description = "VirtualBox Test Machine Log Socket"; - wantedBy = [ "sockets.target" ]; - before = [ "multi-user.target" ]; - socketConfig.ListenStream = "/run/virtualbox-log-${name}.sock"; - socketConfig.Accept = true; - }; - }); - - systemd.services = listToAttrs (singleton { - name = "vboxtestlog-${name}@"; - value = { - description = "VirtualBox Test Machine Log"; - serviceConfig.StandardInput = "socket"; - serviceConfig.StandardOutput = "syslog"; - serviceConfig.SyslogIdentifier = "GUEST-${name}"; - serviceConfig.ExecStart = "${pkgs.coreutils}/bin/cat"; - }; - }); + systemd.sockets."vboxtestlog-${name}" = { + description = "VirtualBox Test Machine Log Socket"; + wantedBy = [ "sockets.target" ]; + before = [ "multi-user.target" ]; + socketConfig.ListenStream = "/run/virtualbox-log-${name}.sock"; + socketConfig.Accept = true; + }; + + systemd.services."vboxtestlog-${name}@" = { + description = "VirtualBox Test Machine Log"; + serviceConfig.StandardInput = "socket"; + serviceConfig.StandardOutput = "syslog"; + serviceConfig.SyslogIdentifier = "GUEST-${name}"; + serviceConfig.ExecStart = "${pkgs.coreutils}/bin/cat"; + }; }; testSubs = '' |