-
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathflake.nix
More file actions
46 lines (40 loc) · 1.41 KB
/
Copy pathflake.nix
File metadata and controls
46 lines (40 loc) · 1.41 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
{
description = "Server-optimized NixOS configuration";
nixConfig.extra-substituters = [ "https://nix-community.cachix.org" ];
nixConfig.extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
outputs =
publicInputs@{ self, nixpkgs, ... }:
let
# Just the NixOS and Darwin modules
modules = import ./.;
# Evaluate the private dev flake via vendored flake-compat so
# its inputs don't leak into the public flake.
privateFlake = (import ./dev/private/flake-compat.nix { src = ./dev/private; }).defaultNix;
inputs = privateFlake.inputs // publicInputs;
devFlake =
# builtins.getFlake is not available in flake-compat mode
if builtins ? getFlake then
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./dev
];
# Make the modules available for checks
flake = modules;
}
else
{ };
in
modules
//
# Only load the devFlake if some of those attributes are accessed.
{
devShells = devFlake.devShells or { };
packages = devFlake.packages or { };
formatter = devFlake.formatter or { };
checks = devFlake.checks or { };
herculesCI = devFlake.herculesCI or { };
};
}