-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
80 lines (69 loc) · 2.13 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
description = "Random packages";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
systems.url = "github:nix-systems/default-linux";
flake-utils = {
url = "flake:flake-utils";
inputs.systems.follows = "systems";
};
piped-frontend-src = {
url = "github:TeamPiped/Piped";
flake = false;
};
piped-proxy-src = {
url = "github:TeamPiped/piped-proxy";
flake = false;
};
piped-backend-src = {
url = "github:TeamPiped/piped-backend";
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
{
nixosModules.default = { ... }: {
imports = [
(import ./piped-backend/module.nix { inherit self; })
(import ./piped-frontend/module.nix { inherit self; })
(import ./piped-proxy/module.nix { inherit self; })
];
};
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
in
with pkgs;
rec {
packages = flake-utils.lib.flattenTree rec {
piped-proxy = callPackage ./piped-proxy {
src = inputs.piped-proxy-src;
};
piped-proxy-test = nixosTest (import ./piped-proxy/test.nix { inherit self; });
piped-backend = callPackage ./piped-backend rec {
src = inputs.piped-backend-src;
jdk = pkgs.jdk21_headless;
gradle = pkgs.gradle.override { java = jdk; };
};
piped-backend-test = nixosTest (import ./piped-backend/test.nix { inherit self; });
piped-frontend = callPackage ./piped-frontend {
src = inputs.piped-frontend-src;
};
piped-frontend-test = nixosTest (import ./piped-frontend/test.nix { inherit self; });
piped-test = nixosTest (import ./piped-test { inherit self; });
};
checks = flake-utils.lib.flattenTree {
inherit (packages) piped-proxy-test piped-backend-test piped-frontend-test;
};
devShells.default = mkShell {
name = "package-update";
nativeBuildInputs = [
nodejs
prefetch-npm-deps
mitm-cache
];
};
}
);
}