-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
57 lines (48 loc) · 1.52 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in {
packages."${system}" = {
stackman-api-demo = pkgs.callPackage ./stackman-api {};
stackman-ui = (pkgs.callPackage ./stackman-ui {}).stackman-ui;
stackman-ui-prototype = pkgs.callPackage ./stackman-ui-prototype {};
stackman-container = pkgs.callPackage ({ dockerTools, writeScript }:
dockerTools.buildLayeredImage {
name = "stackman";
fakeRootCommands = ''
${dockerTools.shadowSetup}
useradd --system --user-group --create-home stackman
'';
enableFakechroot = true;
config = {
Cmd = [
"${pkgs.stackman-api-demo}/bin/stackman-api-demo"
"-a" "/data/albums.json"
];
User = "stackman";
ExposedPorts = { "8000/tcp" = {}; };
};
}
) {};
};
checks."${system}" = {
inherit (pkgs.callPackage ./stackman-ui {})
stackman-ui-prettier stackman-ui-typescript;
};
overlays.default = final: prev: { } // self.packages."${system}";
devShells."${system}".default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.nodejs
pkgs.nodePackages.typescript-language-server
];
};
};
}