feat: got teh wing working

its not 100% ready for prod yet as there is no way to transfer from ptero yet
This commit is contained in:
silver 2024-12-10 00:44:38 +00:00
parent 58787628d2
commit 34b2ef6a84
Signed by: silver
GPG key ID: 36F93D61BAD3FD7D
4 changed files with 60 additions and 4 deletions

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 = { wing = {
enable = mkEnableOption "Pelican Wing"; enable = mkEnableOption "Pelican Wing";
node_name = mkOption {
type = types.str;
};
}; };
}; };
@ -211,6 +215,26 @@ in {
}) })
(mkIf cfg.wing.enable { (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]; networking.firewall.allowedTCPPorts = [8080 8443];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
@ -219,6 +243,17 @@ in {
(pkgs.callPackage ./pelican-wing-package.nix {}) (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 = { systemd.services.pelican-wings = {
description = "Wings Daemon"; description = "Wings Daemon";
after = ["docker.service"]; after = ["docker.service"];

View file

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

View file

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