-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
57 lines (54 loc) · 1.37 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
{
description = "Versia Server";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
flake-utils.url = "github:numtide/flake-utils";
};
nixConfig = {
extra-substituters = [
"https://cache.kyouma.net"
];
extra-trusted-public-keys = [
"cache.kyouma.net:Frjwu4q1rnwE/MnSTmX9yx86GNA/z3p/oElGvucLiZg="
];
};
outputs = { self, nixpkgs, flake-utils, ... }: {
hydraJobs = {
inherit (self) packages;
};
overlays.default = final: prev: {
versiajs = final.callPackage ./nix/package.nix {};
};
} //
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in {
packages = {
inherit (pkgs) versiajs;
default = self.packages.${system}.versiajs;
};
apps.update-modules = {
type = "app";
program = ./nix/update.sh;
};
}) //
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
bun
nodejs
nodePackages.typescript
nodePackages.typescript-language-server
nix-ld
];
};
};
});
}