/ flake.nix
flake.nix
 1  {
 2    description = "Description for the project";
 3  
 4    inputs = {
 5      devenv-root = {
 6        url = "file+file:///dev/null";
 7        flake = false;
 8      };
 9      nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
10      flake-parts.url = "github:hercules-ci/flake-parts";
11      flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
12      devenv.url = "github:cachix/devenv";
13      nix2container.url = "github:nlewo/nix2container";
14      nix2container.inputs.nixpkgs.follows = "nixpkgs";
15      mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
16    };
17  
18    nixConfig = {
19      extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
20      extra-substituters = "https://devenv.cachix.org";
21    };
22  
23    outputs =
24      inputs@{ flake-parts, devenv-root, ... }:
25      flake-parts.lib.mkFlake { inherit inputs; } {
26        imports = [
27          inputs.devenv.flakeModule
28        ];
29        systems = [
30          "x86_64-linux"
31          "i686-linux"
32          "x86_64-darwin"
33          "aarch64-linux"
34          "aarch64-darwin"
35        ];
36  
37        perSystem =
38          {
39            config,
40            self',
41            inputs',
42            pkgs,
43            system,
44            ...
45          }:
46          {
47            # Per-system attributes can be defined here. The self' and inputs'
48            # module parameters provide easy access to attributes of the same
49            # system.
50  
51            # Equivalent to  inputs'.nixpkgs.legacyPackages.hello;
52            packages.default = pkgs.hello;
53  
54            devenv.shells.default = {
55              name = "lionsmane";
56  
57              imports = [
58                # This is just like the imports in devenv.nix.
59                # See https://devenv.sh/guides/using-with-flake-parts/#import-a-devenv-module
60                # ./devenv-foo.nix
61              ];
62  
63              # https://devenv.sh/reference/options/
64              packages = [
65                config.packages.default
66                pkgs.nest-cli
67              ];
68  
69              languages = {
70                javascript = {
71                  enable = true;
72                  package = pkgs.nodejs_24;
73                  pnpm.enable = true;
74                };
75                typescript.enable = true;
76              };
77  
78              processes.hello.exec = "hello";
79            };
80  
81          };
82        flake = {
83          # The usual flake attributes can be defined here, including system-
84          # agnostic ones like nixosModule and system-enumerating ones, although
85          # those are more easily expressed in perSystem.
86  
87        };
88      };
89  }