54 lines
1.4 KiB
Nix
Executable file
54 lines
1.4 KiB
Nix
Executable file
{
|
|
description = "a collection of personal nix configurations";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
hardware.url = "github:nixos/nixos-hardware";
|
|
|
|
amdl.url = "git+https://git.reidlab.pink/reidlab/amdl.git";
|
|
|
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
|
};
|
|
|
|
outputs = inputs @ { self, nixpkgs, ... }:
|
|
let
|
|
inherit (lib.my) mapModules mapModulesRec mapHosts;
|
|
system = "aarch64-linux";
|
|
|
|
mkPkgs = pkgs: extraOverlays:
|
|
import pkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
config.allowAliases = true;
|
|
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
|
};
|
|
pkgs = mkPkgs nixpkgs [ self.overlays.default ];
|
|
|
|
lib = nixpkgs.lib.extend (final: prev: {
|
|
my = import ./lib {
|
|
inherit pkgs inputs;
|
|
lib = final;
|
|
};
|
|
});
|
|
in {
|
|
lib = lib.my;
|
|
|
|
overlays =
|
|
(mapModules ./overlays import)
|
|
// {
|
|
default = final: prev: {
|
|
my = self.packages.${system};
|
|
};
|
|
};
|
|
|
|
packages."${system}" = mapModules ./packages (p: pkgs.callPackage p {});
|
|
|
|
nixosModules = mapModulesRec ./modules import;
|
|
|
|
nixosConfigurations = mapHosts ./hosts {};
|
|
};
|
|
}
|