33 lines
973 B
Nix
Executable file
33 lines
973 B
Nix
Executable file
{
|
|
description = "Flake-o-rama";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
};
|
|
|
|
outputs = inputs @ { self, nixpkgs, ... }:
|
|
let
|
|
system = "aarch64-linux";
|
|
|
|
lib = import ./lib { inherit pkgs inputs; lib = nixpkgs.lib; };
|
|
inherit (lib._) mapModules mapModulesRec mkHost;
|
|
|
|
mkPkgs = pkgs: overlays: import pkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
overlays = overlays ++ (lib.attrValues self.overlays);
|
|
};
|
|
|
|
pkgs = mkPkgs nixpkgs [ self.overlay ];
|
|
in {
|
|
packages."${system}" = mapModules ./packages (p: pkgs.callPackage p {});
|
|
overlay = final: prev: {
|
|
_ = self.packages."${system}";
|
|
};
|
|
overlays = mapModules ./overlays import;
|
|
nixosModules = (mapModulesRec ./modules import);
|
|
nixosConfigurations = mapModules ./hosts (host: mkHost host { inherit system; });
|
|
};
|
|
}
|