diff options
Diffstat (limited to '')
-rw-r--r-- | inputs.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/inputs.nix b/inputs.nix new file mode 100644 index 0000000..50c4deb --- /dev/null +++ b/inputs.nix @@ -0,0 +1,53 @@ +{ 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 + ({ inherit self; } // 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; }) + ]; + } // { 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; }; + + 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; + }; +in inputs |