-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
48 lines (41 loc) · 1.08 KB
/
configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ nixpkgs, albatross, pkgs, ... }:
{
imports = [
"${nixpkgs}/nixos/modules/profiles/minimal.nix"
"${nixpkgs}/nixos/modules/profiles/headless.nix"
albatross.nixosModules.albatross
];
services.albatross = {
enable = true;
# Enable the TLS endpoint and configure the certificates
cacert = ./cacert.pem;
endpoint = {
enable = true;
cert = ./server.pem;
# Configure the server's private key
# This is not ideal: The key is copied into the Nix store, which is
# readable by all users on the server and on the developer machine.
private_key = ./server.key;
};
# Forward some ports bind by unikernels
forwardPorts = [
{
destination = "10.0.0.2:8080";
proto = "tcp";
sourcePort = 8080;
}
{
destination = "10.0.0.2:4433";
proto = "tcp";
sourcePort = 4433;
}
];
};
services.openssh = {
enable = true;
permitRootLogin = "yes";
};
users.users.root.initialPassword = "test";
users.mutableUsers = false;
system.stateVersion = "22.05";
}