generated from matfantinel/sveltekit-static-blog-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
60 lines (53 loc) · 1.89 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = { self, nixpkgs, devenv, systems, ... } @ inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
});
formatter = forEachSystem (system:
inputs.treefmt-nix.lib.evalModule nixpkgs.legacyPackages.${system} ./treefmt.nix
);
devShells = forEachSystem
(system:
let
inherit (pkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in
{
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
{
languages.javascript.enable = true;
languages.javascript.npm.install.enable = true;
languages.nix.enable = true;
languages.typescript.enable = true;
# https://devenv.sh/reference/options/
packages = [
pkgs.npm-check-updates
pkgs.nodePackages.vercel
treefmtEval.config.build.wrapper
] ++ lib.attrValues treefmtEval.config.build.programs;
enterShell = ''
${pkgs.figlet}/bin/figlet -f slant "maxdaten.io" | ${pkgs.lolcat}/bin/lolcat
'';
}
];
};
});
};
}