-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
37 lines (37 loc) · 977 Bytes
/
flake.nix
File metadata and controls
37 lines (37 loc) · 977 Bytes
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
systems.url = "systems";
treefmt-nix.url = "github:numtide/treefmt-nix";
flake-parts.url = "flake-parts";
};
outputs =
{ flake-parts, systems, ... }@inputs:
let
codegenFlake =
{ ... }:
{
flake.flakeModules.default = ./codegen.nix;
perSystem =
{ config, self', ... }:
{
treefmt = import ./nix/treefmt.nix;
# Demonstration:
codegen = {
enable = true;
root = ./.;
files.".nixpkgs.version".text = "${inputs.nixpkgs.shortRev}\n";
};
};
};
in
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import systems;
imports = [
./codegen.nix
codegenFlake
inputs.treefmt-nix.flakeModule
inputs.flake-parts.flakeModules.flakeModules
];
};
}