mirror of
https://github.com/sbrow/nix.git
synced 2026-02-27 21:31:45 -05:00
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{
|
|
description = "Utilities for running Laravel, particularly with Vagrant";
|
|
|
|
outputs = { nixpkgs, self }: {
|
|
nixosModules = {
|
|
laravel = import ./nixos/modules/web-apps/laravel.nix;
|
|
vagrant = { ... }: { imports = [ ./nixos/modules/virtualisation/vagrant.nix ]; };
|
|
};
|
|
|
|
checks."x86_64-linux".vagrant = let
|
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
|
in pkgs.nixosTest {
|
|
name = "vagrant-box-test";
|
|
nodes.machine = { config, pkgs, ... }: {
|
|
imports = [ self.nixosModules.vagrant ];
|
|
config = {
|
|
assertions = [
|
|
{
|
|
assertion = config.services.laravel.enable == false;
|
|
message = "Laravel should be disabled";
|
|
}
|
|
{
|
|
assertion = config.services.laravel.bashAliases.enable == config.services.laravel.enable;
|
|
message = "Bash aliases should be enabled";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
testScript = ''
|
|
# run hello on machine and check for output
|
|
# test is a simple python script
|
|
machine.succeed('cd /vagrant && php artisan')
|
|
'';
|
|
};
|
|
};
|
|
}
|