1 import ./make-test-python.nix ({ lib, ... } : {
2 name = "nixos-generate-config";
3 meta.maintainers = with lib.maintainers; [ basvandijk ];
5 system.nixos-generate-config.configuration = ''
7 { config, pkgs, ... }: {
8 imports = [ ./hardware-configuration.nix ];
14 system.nixos-generate-config.desktopConfiguration = [''
16 services.xserver.displayManager.gdm.enable = true;
17 services.xserver.desktopManager.gnome.enable = true;
22 machine.wait_for_unit("multi-user.target")
23 machine.succeed("nixos-generate-config")
25 # Test if the configuration really is overridden
26 machine.succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix")
28 # Test if desktop configuration really is overridden
29 machine.succeed("grep 'DESKTOP' /etc/nixos/configuration.nix")
31 # Test of if the Perl variable $bootLoaderConfig is spliced correctly:
33 "grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix"
36 # Test if the Perl variable $desktopConfiguration is spliced correctly
38 "grep 'services\\.xserver\\.desktopManager\\.gnome\\.enable = true;' /etc/nixos/configuration.nix"