forked from Openmesh-Network/xnode-nextjs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
46 lines (42 loc) · 994 Bytes
/
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
{
description = "Nextjs app running on Xnode!";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{
self,
nixpkgs,
systems,
}:
let
# A helper that helps us define the attributes below for
# all systems we care about.
eachSystem =
f:
nixpkgs.lib.genAttrs (import systems) (
system:
f {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
}
);
in
{
packages = eachSystem (
{ pkgs, ... }:
{
default = pkgs.callPackage ./nix/package.nix { };
}
);
checks = eachSystem (
{ pkgs, system, ... }:
{
package = self.packages.${system}.default;
nixos-module = pkgs.callPackage ./nix/nixos-test.nix { };
}
);
nixosModules.default = ./nix/nixos-module.nix;
};
}