-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
86 lines (83 loc) · 3.28 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
81
82
83
84
85
86
{
description = "learning htmx";
inputs.nixpkgs.url = "github:nixos/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
# add this line
inputs.sbt-derivation.url = "github:zaninime/sbt-derivation";
# recommended for first style of usage documented below, but not necessary
inputs.sbt-derivation.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, flake-utils, sbt-derivation }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
price-grid = import ./11-single-price-grid-component/default.nix {
inherit pkgs sbt-derivation;
lib = pkgs.lib;
};
order-summary =
import ./12-order-summary-component-thymeleaf/default.nix {
inherit pkgs sbt-derivation;
lib = pkgs.lib;
};
testimonials-grid = import ./13-testimonials-grid-section/default.nix {
inherit pkgs sbt-derivation;
lib = pkgs.lib;
};
rock-paper-scissors = import ./14-rock-paper-scissors/default.nix {
inherit pkgs sbt-derivation;
lib = pkgs.lib;
};
multi-step-form = import ./15-multi-step-form/default.nix {
inherit pkgs sbt-derivation;
lib = pkgs.lib;
};
countries-page = import ./16-countries-page-from-api {
inherit pkgs sbt-derivation;
lib = pkgs.lib;
};
results-component-go = import ./17-results-summary-component-go {
inherit pkgs;
lib = pkgs.lib;
};
in {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.scala-cli
pkgs.sbt
pkgs.scalafmt
pkgs.jdk
pkgs.nodePackages.tailwindcss
pkgs.nodePackages.prettier
pkgs.rustywind
pkgs.go
pkgs.wgo
pkgs.semgrep
pkgs.gopls
];
shellHook = ''
export GOPATH=$PWD/.go
export PATH=$GOPATH/bin:$PATH
'';
};
packages.price-grid-app = price-grid.package;
nixosModules.price-grid-app = price-grid.module;
packages.price-grid-app-image = price-grid.image;
packages.order-summary = order-summary.package;
packages.order-summary-image = order-summary.image;
nixosModules.order-summary = order-summary.module;
packages.testimonials-grid = testimonials-grid.package;
packages.testimonials-grid-image = testimonials-grid.image;
nixosModules.testimonials-grid = testimonials-grid.module;
packages.rock-paper-scissors = rock-paper-scissors.package;
packages.rock-paper-scissors-image = rock-paper-scissors.image;
nixosModules.rock-paper-scissors = rock-paper-scissors.module;
packages.multi-step-form = multi-step-form.package;
packages.multi-step-form-image = multi-step-form.image;
nixosModules.multi-step-form = multi-step-form.module;
packages.countries-page = countries-page.package;
packages.countries-page-image = countries-page.image;
packages.results-component-go = results-component-go.package;
packages.results-component-go-image = results-component-go.image;
});
# see https://serokell.io/blog/practical-nix-flakes
}