-
Notifications
You must be signed in to change notification settings - Fork 43
/
flake.nix
70 lines (67 loc) · 1.99 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
{
description = "Flake basics described using the module system";
inputs = {
nixpkgs-lib.url = "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"; # 970e93b9f82e2a0f3675757eb0bfc73297cc6370 /lib from nixos-unstable
};
outputs = inputs@{ nixpkgs-lib, ... }:
let
lib = import ./lib.nix {
inherit (nixpkgs-lib) lib;
# Extra info for version check message
revInfo =
if nixpkgs-lib?rev
then " (nixpkgs-lib.rev: ${nixpkgs-lib.rev})"
else "";
};
templates = {
default = {
path = ./template/default;
description = ''
A minimal flake using flake-parts.
'';
};
multi-module = {
path = ./template/multi-module;
description = ''
A minimal flake using flake-parts.
'';
};
unfree = {
path = ./template/unfree;
description = ''
A minimal flake using flake-parts importing nixpkgs with the unfree option.
'';
};
package = {
path = ./template/package;
description = ''
A flake with a simple package:
- Nixpkgs
- callPackage
- src with fileset
- a check with runCommand
'';
};
};
flakeModules = {
easyOverlay = ./extras/easyOverlay.nix;
flakeModules = ./extras/flakeModules.nix;
modules = ./extras/modules.nix;
partitions = ./extras/partitions.nix;
};
in
lib.mkFlake { inherit inputs; } {
systems = [ ];
imports = [ flakeModules.partitions ];
partitionedAttrs.checks = "dev";
partitionedAttrs.devShells = "dev";
partitionedAttrs.herculesCI = "dev";
partitions.dev.extraInputsFlake = ./dev;
partitions.dev.module = {
imports = [ ./dev/flake-module.nix ];
};
flake = {
inherit lib templates flakeModules;
};
};
}