-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
45 lines (43 loc) · 1.48 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
{
description = "This is the frontend for Project-W, a service that converts uploaded audio files into downloadable text transcripts using OpenAIs whisper AI model, hosted on a backend server and dedicated runners.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
pnpm2nix-nzbr = {
#use this instead of main repo nzbr/pnpm2nix-nzbr because this pr fixes compatibility with lockfile v9
#see https://github.com/nzbr/pnpm2nix-nzbr/pull/40
url = "github:wrvsrx/pnpm2nix-nzbr/adapt-to-v9";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
nixpkgs,
systems,
pnpm2nix-nzbr,
...
}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = eachSystem (system: import nixpkgs { inherit system; });
in
{
packages = eachSystem (system: rec {
default = project-W_frontend;
project-W_frontend = pkgsFor.${system}.callPackage ./nix/derivation-frontendFiles.nix {
mkPnpmPackage = pnpm2nix-nzbr.packages.${system}.mkPnpmPackage;
};
});
devShells = eachSystem (system: {
default = import ./nix/shell.nix {
inherit inputs system;
pkgs = pkgsFor.${system};
};
});
nixosModules.default = import ./nix/module.nix inputs;
};
}