blob: 9cb3bf36ba4395c366c4aad1ab7b62023681210f (
plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
{ system ? "x86_64-linux", sources ? import ./npins }:
let
# some of my dependencies are only usable as flakes. this is just enough
# nonsense to import these
callFlake = name: inputs:
let
self = (import "${sources.${name}}/flake.nix").outputs
({ self = self // { outPath = sources.${name}.outPath; }; } // inputs);
in
self // { outPath = sources.${name}.outPath; };
inputs = sources // rec {
flake-utils = callFlake "flake-utils" { };
deploy-rs = callFlake "deploy-rs" {
# there's an implicit contract here that the module deploy-rs produces
# will not depend on the nixpkgs it is given, but that works out
inherit nixpkgs;
utils = flake-utils;
};
# both copies of nixpkgs get // { outPath = }'d, so that the nixPath
# override can use these paths.
nixpkgs = import sources.nixpkgs {
inherit system;
overlays = [
(import sources.rust-overlay)
deploy-rs.overlay
(import ./pkgs/overlay.nix { inherit inputs; })
lix-overlay
];
} // { outPath = sources.nixpkgs.outPath; };
# 'boring' version of nixpkgs with fewer (used for vm tests,
# so they're buildable without having to compile e.g. the lix version
# from the overlay)
nixpkgs-boring = import sources.nixpkgs {
inherit system;
overlays = [
(import ./pkgs/overlay.nix { inherit inputs; })
];
} // { outPath = sources.nixpkgs.outPath; };
nixpkgs-unstable =
import sources.nixpkgs-unstable { inherit system; }
// { outPath = sources.nixpkgs-unstable.outPath; };
# this absurd third copy only exists because non-flake nixpkgs does not
# as easily expose the evalConfig function ..
nixpkgs-flake =
(import "${sources.nixpkgs}/flake.nix").outputs { self = nixpkgs-flake; }
// { outPath = sources.nixpkgs.outPath; };
home-manager = callFlake "home-manager" { inherit nixpkgs; };
feeds = import /home/stuebinm/org/nonpublic.nix;
sops-nix = import "${sources.sops-nix}/modules/sops";
simple-nixos-mailserver = import sources.simple-nixos-mailserver;
lix-overlay = import "${sources.lix-nixos-module}/overlay.nix" {
lix = sources.lix // { rev = sources.lix.revision; };
};
###### Forester stuff
flake-compat = import sources.flake-compat;
# currently unused
opam2json = callFlake "opam2json" {
nixpkgs = nixpkgs-flake;
};
# opam-nix does not want to be called like this; i do not know why
# opam-nix = callFlake "opam-nix"{
# inherit (sources) opam-repository opam-overlays mirage-opam-overlays;
# inherit (inputs) flake-utils opam2json flake-compat;
# nixpkgs = nixpkgs-unstable-flake;
# };
# so i gave up an use the flake-compat'd version instead, which uses an
# old nixpkgs pin i cannot easily change ...
opam-nix = (flake-compat { src = sources.opam-nix.outPath; }).defaultNix;
ocaml-forester = callFlake "ocaml-forester" {
nixpkgs = nixpkgs-flake;
inherit (inputs) opam-nix flake-utils;
inherit (sources) opam-repository;
};
};
in inputs
|