Created
January 16, 2017 15:56
-
-
Save bobvanderlinden/939cd64a8290a7388cce2cf4303b0995 to your computer and use it in GitHub Desktop.
VM definition to test nginx virtualHost.<name>.serverName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? ./default.nix, | |
nixos ? ./nixos/release.nix, | |
system ? "x86_64-linux" | |
}: | |
{ | |
vm = (import ./nixos/lib/eval-config.nix { | |
inherit system; | |
modules = [ | |
{ | |
services.nginx = { | |
enable = true; | |
virtualHosts = { | |
"example_http" = { | |
serverName = "example.org"; | |
root = ./wwwroot; | |
}; | |
"example_https" = { | |
serverName = "example.org"; | |
enableSSL = true; | |
enableACME = true; | |
root = ./wwwroot; | |
}; | |
}; | |
}; | |
} | |
./nixos/modules/virtualisation/qemu-vm.nix | |
{ | |
# Set root password to 'root' | |
users.users.root.initialHashedPassword = "$6$4U4VJBBGt$FPB2jVV5FtCzpuzwePILcKMN1MQ5n8714jLrkkxD50UIOlfNjjcGx1ywYGrx41w569UDYmNC1MO9tD8j.Nzoy."; | |
} | |
]; | |
}).config.system.build.vm; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment