The Wings module has been brought to a working state, and flake.nix has been updated
This commit is contained in:
21
flake.nix
21
flake.nix
@@ -6,14 +6,27 @@
|
|||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux"] (system:
|
let
|
||||||
|
forAllSystems = flake-utils.lib.eachSystem [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosModules = rec {
|
||||||
|
wings = ./modules/wings;
|
||||||
|
default = wings;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = forAllSystems (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.wings = pkgs.callPackage ./pkgs/wings { };
|
wings = pkgs.callPackage ./pkgs/wings { };
|
||||||
nixosModules.wings = import ./modules/wings { };
|
default = self.packages.${system}.wings;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,28 +12,25 @@ in
|
|||||||
default = null;
|
default = null;
|
||||||
description = "Package to use for Wings daemon";
|
description = "Package to use for Wings daemon";
|
||||||
};
|
};
|
||||||
configFile = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = "/etc/pterodactyl/config.yml";
|
|
||||||
description = "Path to Wings configuration";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
systemd.services.wings = {
|
systemd.services.pterodactyl-wings = {
|
||||||
description = "Pterodactyl Wings";
|
description = "Pterodactyl Wings";
|
||||||
after = [ "docker.service" ];
|
after = [ "docker.service" ];
|
||||||
requires = [ "docker.service" ];
|
requires = [ "docker.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${wings}/bin/wings --config ${cfg.configFile}";
|
ExecStart = "${wings}/bin/wings --config /etc/pterodactyl/config.yml";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
DynamicUser = true;
|
|
||||||
StateDirectory = "wings";
|
User = "root";
|
||||||
|
Group = "root";
|
||||||
|
|
||||||
BindPaths = [ "/var/run/docker.sock" ];
|
BindPaths = [ "/var/run/docker.sock" ];
|
||||||
LimitNOFILE = 1048576;
|
LimitNOFILE = 1048576;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user