2021-03-31 22:15:08 +00:00
|
|
|
{
|
2022-05-27 17:20:45 +00:00
|
|
|
inputs.nixpkgs.url = "nixpkgs/nixos-22.05";
|
2021-04-06 03:11:17 +00:00
|
|
|
|
2022-03-28 04:48:15 +00:00
|
|
|
outputs = { self, nixpkgs, ... }:
|
2021-08-20 17:40:05 +00:00
|
|
|
let
|
2021-11-18 20:45:24 +00:00
|
|
|
|
2021-11-01 18:45:18 +00:00
|
|
|
mypkgs = import ./pkgs;
|
2021-12-27 18:21:16 +00:00
|
|
|
deploy = import lib/deploy.nix;
|
2022-01-02 21:37:05 +00:00
|
|
|
|
2022-03-07 16:10:35 +00:00
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs
|
|
|
|
[ "x86_64-linux" "aarch64-linux" ]
|
|
|
|
(system: f system);
|
2021-11-18 20:45:24 +00:00
|
|
|
|
2021-11-22 05:38:03 +00:00
|
|
|
pins = {
|
2022-01-05 21:59:52 +00:00
|
|
|
nix.registry.nixpkgs.to = {
|
|
|
|
inherit (nixpkgs) rev;
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
|
|
|
type = "github";
|
|
|
|
};
|
2021-11-18 20:45:24 +00:00
|
|
|
nix.registry.bck.to = {
|
|
|
|
owner = "buckley310";
|
|
|
|
repo = "nixos-config";
|
|
|
|
type = "github";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-06-15 02:52:14 +00:00
|
|
|
mods =
|
|
|
|
{
|
|
|
|
inherit pins;
|
|
|
|
pkgs.nixpkgs.overlays = [ (_: mypkgs) ];
|
|
|
|
} //
|
2021-09-10 04:42:41 +00:00
|
|
|
nixpkgs.lib.mapAttrs'
|
|
|
|
(name: type: {
|
2021-10-08 17:31:06 +00:00
|
|
|
name = nixpkgs.lib.removeSuffix ".nix" name;
|
2021-09-10 04:42:41 +00:00
|
|
|
value = import (./modules + "/${name}");
|
|
|
|
})
|
|
|
|
(builtins.readDir ./modules);
|
2021-06-12 01:32:23 +00:00
|
|
|
|
2022-06-15 02:52:14 +00:00
|
|
|
in
|
|
|
|
{
|
2022-06-17 17:06:41 +00:00
|
|
|
lib = { inherit forAllSystems deploy; };
|
2022-06-15 02:52:14 +00:00
|
|
|
|
|
|
|
nixosModules = mods // { default.imports = builtins.attrValues mods; };
|
2021-06-05 06:22:38 +00:00
|
|
|
|
2022-06-17 03:30:12 +00:00
|
|
|
nixosConfigurations = builtins.mapAttrs
|
|
|
|
(_: nixpkgs.lib.nixosSystem)
|
2022-06-17 17:06:41 +00:00
|
|
|
(import ./hosts self.nixosModules.default);
|
2021-06-05 06:22:38 +00:00
|
|
|
|
2021-11-29 07:05:40 +00:00
|
|
|
apps = forAllSystems (system:
|
2022-05-04 17:27:07 +00:00
|
|
|
import lib/apps.nix nixpkgs.legacyPackages.${system});
|
2022-03-18 05:36:18 +00:00
|
|
|
|
2022-05-04 17:34:39 +00:00
|
|
|
packages = forAllSystems (system:
|
|
|
|
mypkgs nixpkgs.legacyPackages.${system});
|
2021-04-05 21:56:06 +00:00
|
|
|
};
|
2021-03-31 22:15:08 +00:00
|
|
|
}
|