nixos-server/services/readme.md

27 lines
461 B
Markdown
Raw Normal View History

2024-05-24 11:13:36 +02:00
# Services
Contains files defining services.
Services are of the form:
```nix
2024-05-25 15:12:56 +02:00
{ pkgs, lib, ... }: {
2024-05-24 11:13:36 +02:00
name = "name";
config = { ... };
ports = {
tcp = [ 80 ];
udp = [ 111 ];
http = 80;
2024-05-25 15:12:56 +02:00
forward = [ { container = 22; host = 22; proto = "tcp"; } ];
2024-05-24 11:13:36 +02:00
};
hosts = [ "myservice.domain.mjau" ];
2024-05-25 01:01:07 +02:00
volumes = [
{
name = "myservice-storage";
mountPoint = "/var/lib/whatever";
readOnly = false;
};
];
2024-05-25 15:12:56 +02:00
hostConfig = { ... }
2024-05-24 11:13:36 +02:00
}
```