nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 33 lines 816 B view raw
1{ 2 pkgs, 3 latestKernel ? false, 4 ... 5}: 6 7{ 8 name = "disable-installer-tools"; 9 10 nodes.machine = 11 { pkgs, lib, ... }: 12 { 13 system.disableInstallerTools = true; 14 boot.enableContainers = false; 15 environment.defaultPackages = [ ]; 16 }; 17 18 testScript = '' 19 machine.wait_for_unit("multi-user.target") 20 machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'") 21 22 with subtest("nixos installer tools should not be included"): 23 machine.fail("which nixos-rebuild") 24 machine.fail("which nixos-install") 25 machine.fail("which nixos-generate-config") 26 machine.fail("which nixos-enter") 27 machine.fail("which nixos-version") 28 machine.fail("which nixos-build-vms") 29 30 with subtest("perl should not be included"): 31 machine.fail("which perl") 32 ''; 33}