feat: build docker images with nix

This commit is contained in:
2026-07-22 18:43:35 +09:00
parent a8236ff3b4
commit c1ee1ff9e9
6 changed files with 329 additions and 146 deletions
+17 -2
View File
@@ -17,6 +17,13 @@
let
pkgs = nixpkgs.legacyPackages.${system};
yoi = pkgs.callPackage ./package.nix { };
dockerImages =
if pkgs.stdenv.isLinux then
import ./docker.nix {
inherit pkgs yoi;
}
else
{ };
mkApp = name: description: {
type = "app";
program = "${yoi}/bin/${name}";
@@ -24,8 +31,16 @@
};
in
{
packages.default = yoi;
packages.yoi = yoi;
packages = {
default = yoi;
yoi = yoi;
}
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
docker-runtime = dockerImages.runtime;
docker-server = dockerImages.server;
docker-webui = dockerImages.webui;
webui-static = dockerImages.webui-static;
};
apps.default = mkApp "yoi" "Run the Yoi terminal UI";
apps.yoi = mkApp "yoi" "Run the Yoi terminal UI";