server/flake.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

{
description = "Versia Server";
2024-08-08 23:42:51 +02:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2024-08-24 18:23:57 +02:00
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
2024-08-15 23:57:31 +02:00
flake-utils.url = "github:numtide/flake-utils";
};
2024-08-24 18:46:19 +02:00
nixConfig = {
extra-substituters = [
"https://cache.kyouma.net"
];
extra-trusted-public-keys = [
"cache.kyouma.net:Frjwu4q1rnwE/MnSTmX9yx86GNA/z3p/oElGvucLiZg="
];
};
2024-08-24 18:23:57 +02:00
outputs = { self, nixpkgs, flake-utils, ... }: {
2024-08-15 23:57:31 +02:00
hydraJobs = {
inherit (self) packages;
};
2024-08-24 18:23:57 +02:00
} // flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: let
2024-08-15 23:57:31 +02:00
pkgs = import nixpkgs {
inherit system;
};
in {
packages = {
versiajs = pkgs.callPackage ./nix/package.nix {};
default = self.packages.${system}.versiajs;
};
2024-08-24 18:23:57 +02:00
}) // flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
};
in {
2024-08-24 18:37:18 +02:00
apps.update-modules = {
type = "app";
program = self.packages.${system}.versiajs.passthru.updateScript;
};
2024-08-15 23:57:31 +02:00
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
bun
nodejs
nodePackages.typescript
nodePackages.typescript-language-server
nix-ld
];
};
2024-08-08 23:42:51 +02:00
};
2024-08-15 23:57:31 +02:00
});
2024-08-08 23:42:51 +02:00
}