add nix run
This commit is contained in:
parent
d8449c60c5
commit
1ab33067a8
4 changed files with 13 additions and 8 deletions
3
Makefile
3
Makefile
|
|
@ -11,6 +11,3 @@ build:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm nixos.qcow2
|
rm nixos.qcow2
|
||||||
|
|
||||||
run:
|
|
||||||
QEMU_NET_OPTS="hostfwd=tcp::8080-:80,hostfwd=tcp::1433-:143,hostfwd=tcp::5877-:587" nixos-shell vm-nextcloud.nix
|
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@ Build test environment
|
||||||
git clone https://github.com/onny/nixos-nextcloud-testumgebung.git
|
git clone https://github.com/onny/nixos-nextcloud-testumgebung.git
|
||||||
cd nixos-nextcloud-testumgebung
|
cd nixos-nextcloud-testumgebung
|
||||||
nix develop
|
nix develop
|
||||||
make
|
make build
|
||||||
```
|
```
|
||||||
|
|
||||||
Run virtual machine
|
Run virtual machine
|
||||||
|
|
||||||
```
|
```
|
||||||
make run
|
nix run
|
||||||
```
|
```
|
||||||
|
|
||||||
Requires NixOS :)
|
Requires NixOS :)
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -6,16 +6,24 @@
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
|
start =
|
||||||
|
pkgs.writeShellScriptBin "start" ''
|
||||||
|
set -e
|
||||||
|
export QEMU_NET_OPTS="hostfwd=tcp::8080-:80,hostfwd=tcp::1433-:143,hostfwd=tcp::5877-:587"
|
||||||
|
${pkgs.nixos-shell}/bin/nixos-shell vm-nextcloud.nix
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
phpPackages.composer
|
phpPackages.composer
|
||||||
phpPackages.phpunit
|
phpunit
|
||||||
nixos-shell
|
nixos-shell
|
||||||
nodejs
|
nodejs
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
packages = { inherit start; };
|
||||||
|
defaultPackage = start;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
server
2
server
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6e77eaa618820ca61fadaa3bbc8950efad3602ce
|
Subproject commit 95eeba83b6570b3cf7cbb79aea42222f7d3e03f4
|
||||||
Loading…
Add table
Add a link
Reference in a new issue