Trying basic nginx example

This commit is contained in:
2024-12-26 19:25:24 +02:00
parent 6bd2426b78
commit ac5d403860
2 changed files with 20 additions and 7 deletions

View File

@@ -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
View 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>
'';
};
};
};
}