Trying basic nginx example
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
{
|
||||
modulesPath,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{ modulesPath, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./disk-config.nix
|
||||
./nginx.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
|
||||
18
nixos/nginx.nix
Normal file
18
nixos/nginx.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }: {
|
||||
services = {
|
||||
getty.autologinUser = "root";
|
||||
nginx = {
|
||||
enable = true;
|
||||
virtualHosts.localhost.locations."/" = {
|
||||
index = "index.html";
|
||||
root = pkgs.writeTextDir "index.html" ''
|
||||
<html>
|
||||
<body>
|
||||
Hello, world!
|
||||
</body>
|
||||
</html>
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user