add docker image to flake
Signed-off-by: Xe <me@christine.website>
This commit is contained in:
parent
c956022422
commit
b92f7d216d
19
flake.nix
19
flake.nix
|
@ -9,7 +9,10 @@
|
||||||
outputs = { self, nixpkgs, flake-utils, naersk, xess, portable-svc }:
|
outputs = { self, nixpkgs, flake-utils, naersk, xess, portable-svc }:
|
||||||
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { overlays = [ portable-svc.overlay ]; inherit system; };
|
pkgs = import nixpkgs {
|
||||||
|
overlays = [ portable-svc.overlay ];
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
naersk-lib = naersk.lib."${system}";
|
naersk-lib = naersk.lib."${system}";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
in rec {
|
in rec {
|
||||||
|
@ -34,6 +37,20 @@
|
||||||
}/static/css/xess.css $out/static/gruvbox.css
|
}/static/css/xess.css $out/static/gruvbox.css
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
docker = let
|
||||||
|
printerfacts = self.packages.${system}.printerfacts;
|
||||||
|
name = "xena/printerfacts";
|
||||||
|
tag = printerfacts.version;
|
||||||
|
in pkgs.dockerTools.buildLayeredImage {
|
||||||
|
inherit name tag;
|
||||||
|
contents = [ printerfacts ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
Cmd = [ "${printerfacts}/bin/printerfacts" ];
|
||||||
|
Env = [ "RUST_LOG=info" "PORT=32042" ];
|
||||||
|
WorkingDir = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
printerfacts-service = pkgs.substituteAll {
|
printerfacts-service = pkgs.substituteAll {
|
||||||
name = "printerfacts.service";
|
name = "printerfacts.service";
|
||||||
src = ./systemd/printerfacts.service.in;
|
src = ./systemd/printerfacts.service.in;
|
||||||
|
|
Loading…
Reference in New Issue