-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
64 lines (55 loc) · 1.61 KB
/
Copy pathdefault.nix
File metadata and controls
64 lines (55 loc) · 1.61 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
{
self ? import ./dev/lib/import-flake.nix { src = ./.; },
inputs ? self.inputs,
system ? builtins.currentSystem,
pkgs ? import inputs.nixpkgs {
config.allowBroken = true;
overlays = [ ];
inherit system;
},
lib ? import "${inputs.nixpkgs}/lib",
}:
let
# custom library (helper functions, builders, ...)
devLib = import ./dev/lib/default.nix { inherit lib; };
default = devLib.simpleScope pkgs.newScope (d: {
inherit
lib
pkgs
self
system
inputs
devLib
flake # (defined below)
default # final scope
;
pkgsCustom = inputs.nixpkgs-custom.legacyPackages.${system} // {
agenix = inputs.agenix.packages.${system}.default;
};
pkgsUnstable = import inputs.nixpkgs-unstable {
config.allowUnfree = true;
overlays = import ./overlays/unstable;
inherit system;
};
formatter = d.import ./dev/formatter.nix { };
packages = d.import ./dev/packages.nix { };
devShells.default = pkgs.mkShellNoCC {
packages = [
d.formatter.package
];
};
overlays.default = final: prev: d.packages;
hosts = d.import ./hosts { };
modules = d.devLib.mkModules ./modules;
scripts = (d.import ./modules/nixos/scripts/default.nix { }).debug.scripts;
# convenience
jk = d.hosts.joker.pkgs;
jkc = d.hosts.joker.config;
nv = d.hosts.navi.pkgs;
nvc = d.hosts.navi.config;
});
flake = default.call ./dev/flake.nix { };
# return final scope, with computed and non-recursive attributes
finalScope = default.fix default;
in
finalScope // finalScope.packages // finalScope.scripts