mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
24 lines
787 B
Nix
24 lines
787 B
Nix
import ./make-test.nix ({ lib, ... } : {
|
|
name = "nixos-generate-config";
|
|
meta.maintainers = with lib.maintainers; [ basvandijk ];
|
|
machine = {
|
|
system.nixos-generate-config.configuration = ''
|
|
# OVERRIDDEN
|
|
{ config, pkgs, ... }: {
|
|
imports = [ ./hardware-configuration.nix ];
|
|
$bootLoaderConfig
|
|
}
|
|
'';
|
|
};
|
|
testScript = ''
|
|
startAll;
|
|
$machine->waitForUnit("multi-user.target");
|
|
$machine->succeed("nixos-generate-config");
|
|
|
|
# Test if the configuration really is overridden
|
|
$machine->succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix");
|
|
|
|
# Test of if the Perl variable $bootLoaderConfig is spliced correctly:
|
|
$machine->succeed("grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix");
|
|
'';
|
|
})
|