File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
{ system ? builtins . currentSystem
2
2
, crossSystem ? null
3
3
, config ? { }
4
+ , deploymentGlobalsFn ? ## :: Pkgs -> GlobalsOverlayOverDefaults
5
+ pkgs :
6
+ if builtins . pathExists ../globals.nix
7
+ then import ../globals.nix pkgs
8
+ else builtins . trace "globals.nix missing, please add symlink" { }
4
9
} :
5
10
let
6
11
defaultSourcePaths = import ./sources.nix { inherit pkgs ; } ;
90
95
( import ./packages.nix )
91
96
] ;
92
97
93
- globals =
94
- if builtins . pathExists ../globals.nix
95
- then [ ( pkgs : _ : with pkgs . lib ; let
98
+ buildGlobals =
99
+ specificGlobalsFn :
100
+
101
+ [ ( pkgs : _ : with pkgs . lib ; let
96
102
globalsDefault = import ../globals-defaults.nix pkgs ;
97
- globalsSpecific = import ../globals.nix pkgs ;
103
+ globalsSpecific = specificGlobalsFn pkgs ;
98
104
in {
99
105
globals = globalsDefault // ( recursiveUpdate {
100
106
inherit ( globalsDefault ) ec2 libvirtd environmentVariables ;
101
107
} globalsSpecific ) ;
102
- } ) ]
103
- else builtins . trace "globals.nix missing, please add symlink" [ ( pkgs : _ : {
104
- globals = import ../globals-defaults.nix pkgs ;
105
108
} ) ] ;
106
109
110
+ globals = buildGlobals deploymentGlobalsFn ;
111
+
107
112
# merge upstream sources with our own:
108
113
upstream-overlay = self : super : {
109
114
inherit iohkNix ;
126
131
varnish-overlay
127
132
] ;
128
133
129
- pkgs = import nixpkgs {
130
- inherit system crossSystem config overlays ;
131
- } ;
134
+ pkgs = import nixpkgs {
135
+ inherit system crossSystem config overlays ;
136
+ } ;
132
137
in
133
138
pkgs
You can’t perform that action at this time.
0 commit comments