-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (39 loc) · 1.27 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
# This flake builds the web app. The result only contains the generated web-
# app (no Docker image or so).
{
description = "Wambo Web (Web App)";
inputs = {
gitignore.url = "github:hercules-ci/gitignore.nix";
gitignore.inputs.nixpkgs.follows = "nixpkgs";
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, gitignore, flake-parts }:
flake-parts.lib.mkFlake { inherit inputs; }
{
flake = { };
# This can be build on all systems.
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { config, pkgs, ... }:
let
project = import ./default.nix {
inherit pkgs;
gitignoreSource = gitignore.lib.gitignoreSource;
};
in
{
devShells = {
default = pkgs.mkShell {
inputsFrom = [ project ];
};
};
formatter = pkgs.nixpkgs-fmt;
# $ nix build .\#<attribute-name>
packages = {
default = project;
};
};
};
}