-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
53 lines (38 loc) · 1.17 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
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
# Until the XZ vulnerability is cleared out.
# The `xz` version in this branch seems to be unaffected.
# See: https://discourse.nixos.org/t/cve-2024-3094-malicious-code-in-xz-5-6-0-and-5-6-1-tarballs/42405/9
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = { self, nixpkgs, flake-utils }: let
inherit (flake-utils.lib) eachDefaultSystem;
mkFlake = system: let
# The set of packages to be used.
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
env-name = "my-room";
fhsEnv = pkgs.buildFHSUserEnv {
name = "${env-name}";
targetPkgs = pkgs: [
# The packages used within the project.
pkgs.nodejs-slim
pkgs.nodePackages_latest.pnpm
pkgs.bun
pkgs.biome
];
};
in {
devShells.default = pkgs.mkShell {
# The packages used within the project.
buildInputs = [ fhsEnv ];
shellHook = ''
exec ${fhsEnv}/bin/${env-name}
'';
};
};
in eachDefaultSystem mkFlake;
}