mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
71 lines
2.2 KiB
Nix
71 lines
2.2 KiB
Nix
{inputs}: let
|
|
tree = import ./tree.nix {
|
|
inherit inputs;
|
|
};
|
|
systems = import ./systems {
|
|
inherit inputs;
|
|
};
|
|
outputs =
|
|
inputs.flake-utils.lib.eachDefaultSystem
|
|
(system: let
|
|
legacyPackages = inputs.self.legacyPackages.${system};
|
|
inherit (legacyPackages) pkgs;
|
|
in {
|
|
devShells = import ./devShells.nix {inherit system inputs;};
|
|
packages = import ./packages {inherit system inputs;};
|
|
legacyPackages = {
|
|
pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
inputs.self.overlays.default
|
|
inputs.self.overlays.deploy-rs
|
|
inputs.self.overlays.arc
|
|
];
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
patchedNixpkgs = pkgs.applyPatches {
|
|
name = "nixpkgs";
|
|
src = inputs.nixpkgs;
|
|
patches = [
|
|
./packages/nixpkgs-keycloak-nullhostname.patch
|
|
];
|
|
};
|
|
deploy-rs = let
|
|
deployLib =
|
|
inputs.deploy-rs.lib.${system}
|
|
or rec {
|
|
activate = throw "deploy-rs.lib.${system} unsupported";
|
|
setActivate = activate;
|
|
deployChecks = _: {};
|
|
};
|
|
deploy-rs =
|
|
inputs.deploy-rs.packages.${system}.default
|
|
or pkgs.${system}.deploy-rs.deploy-rs
|
|
or pkgs.${system}.deploy-rs
|
|
or {
|
|
name = "deploy-rs";
|
|
outPath = throw "deploy-rs.packages.${system} unsupported";
|
|
meta = {};
|
|
};
|
|
in {
|
|
inherit (deploy-rs) name outPath meta;
|
|
inherit (deployLib) activate setActivate deployChecks;
|
|
};
|
|
};
|
|
checks = legacyPackages.deploy-rs.deployChecks inputs.self.deploy;
|
|
});
|
|
inherit (inputs.self.lib.lib) treeToModulesOutput;
|
|
in {
|
|
inherit (outputs) devShells legacyPackages packages checks;
|
|
inherit (systems) deploy nixosConfigurations;
|
|
inherit (tree.impure) overlays;
|
|
nixosModules = treeToModulesOutput tree.impure.modules.extern.nixos;
|
|
homeModules = treeToModulesOutput tree.impure.modules.extern.home;
|
|
miscModules = treeToModulesOutput tree.impure.modules.extern.misc;
|
|
lib = import ./lib.nix {
|
|
inherit tree inputs;
|
|
inherit (systems) systems;
|
|
};
|
|
}
|