-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathflake.nix
More file actions
73 lines (65 loc) · 2.55 KB
/
flake.nix
File metadata and controls
73 lines (65 loc) · 2.55 KB
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
71
72
73
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs =
{ self, ... }@inputs:
let
lib = inputs.pkgs.lib or inputs.nixpkgs.lib or (import "${inputs.nixpkgs or <nixpkgs>}/lib");
forAllSystems = lib.genAttrs lib.platforms.all;
in
{
templates = import ./templates;
lib = import ./lib { inherit lib; };
flakeModules = {
wrappers = ./parts.nix;
default = self.flakeModules.wrappers;
};
nixosModules = builtins.mapAttrs (name: value: {
inherit name value;
_file = value;
key = value;
__functor = self.lib.mkInstallModule;
}) self.lib.wrapperModules;
homeModules = builtins.mapAttrs (
_: v:
v
// {
loc = [
"home"
"packages"
];
}
) self.nixosModules;
wrappers = lib.mapAttrs (_: v: (self.lib.evalModule v).config) self.lib.wrapperModules;
wrappedModules = lib.mapAttrs (
_:
lib.warn ''
Attention: `inputs.nix-wrapper-modules.wrappedModules` is deprecated, use `inputs.nix-wrapper-modules.wrappers` instead
Apologies for any inconvenience this has caused, but they are only the config set of a module, not a module themselves.
In addition, it was very hard to tell the name apart from its actual module counterpart, and it was longer than convenient.
This will be the last time these output names are changing, as a flake-parts module has been added for users to import.
This output will be removed on August 31, 2026
''
) self.wrappers;
wrapperModules = lib.mapAttrs (
_:
lib.warn ''
Attention: `inputs.nix-wrapper-modules.wrapperModules` is deprecated, use `inputs.nix-wrapper-modules.wrappers` instead
Apologies for any inconvenience this has caused. But the title `wrapperModules` should be specific to ones you can import.
In the future, rather than being removed, this will be replaced by the unevaluated wrapper modules from `wlib.wrapperModules`
This output will be replaced with module paths on April 30, 2026
''
) self.wrappers;
formatter = forAllSystems (
system:
(
if inputs.pkgs.stdenv.hostPlatform.system or null == system then
inputs.pkgs
else
import (inputs.pkgs.path or inputs.nixpkgs or <nixpkgs>) {
inherit system;
overlays = inputs.pkgs.overlays or [ ];
}
).nixfmt-tree
);
};
}