test-nixos-pelican #138

Open
silver wants to merge 5 commits from test-nixos-pelican into main
4 changed files with 60 additions and 4 deletions
Showing only changes of commit 34b2ef6a84 - Show all commits

View file

@ -0,0 +1,16 @@
# Notes on Pelican
## Panel
* ``pelican-install`` is in env that can be used to isntall
* then go to ``panel-address.skynet.ie/installer`` to finish the setup
## Wing
In the config the ssl must be set as so:
```yaml
ssl:
enabled: true
cert: /var/lib/acme/skynet/fullchain.pem
key: /var/lib/acme/skynet/key.pem
```

View file

@ -44,6 +44,10 @@ in {
wing = {
enable = mkEnableOption "Pelican Wing";
node_name = mkOption {
type = types.str;
};
};
};
@ -211,6 +215,26 @@ in {
})
(mkIf cfg.wing.enable {
services.skynet.acme.domains = [
"${cfg.wing.node_name}.${domain_panel}"
];
# using https://nixos.org/manual/nixos/stable/index.html#module-services-gitlab as a guide
services.skynet.dns.records = [
{
record = "${cfg.wing.node_name}.${cfg.panel.domain.sub}";
r_type = "CNAME";
value = config.services.skynet.host.name;
}
];
services.nginx.virtualHosts = {
"${cfg.wing.node_name}.${domain_panel}" = {
forceSSL = true;
useACMEHost = "skynet";
locations."/".proxyPass = "http://127.0.0.1:8080";
};
};
networking.firewall.allowedTCPPorts = [8080 8443];
virtualisation.docker.enable = true;
@ -219,6 +243,17 @@ in {
(pkgs.callPackage ./pelican-wing-package.nix {})
];
users.groups.pelican = {};
users.users.pelican = {
#createHome = true;
isSystemUser = true;
#home = "/etc/pelican";
group = "pelican";
extraGroups = ["docker" "acme"];
# X11 is to ensure the directory can be traversed
#homeMode = "711";
};
systemd.services.pelican-wings = {
description = "Wings Daemon";
after = ["docker.service"];

View file

@ -149,7 +149,6 @@
# metrics
ariia = import ./machines/ariia.nix;
# games server - panel/host
optimus = import ./machines/optimus.nix;
};

View file

@ -40,6 +40,12 @@ in {
services.skynet = {
host = host;
#backup.enable = true;
pelican.panel.enable = true;
pelican = {
panel.enable = true;
wing = {
enable = true;
node_name = "node01";
};
};
};
}