2019-12-03 05:18:30 +00:00
|
|
|
{
|
2019-12-05 08:36:15 +00:00
|
|
|
description = "A highly structured configuration database.";
|
2019-12-05 05:36:36 +00:00
|
|
|
|
2020-08-02 04:08:41 +00:00
|
|
|
inputs =
|
|
|
|
{
|
2021-01-11 19:26:25 +00:00
|
|
|
# Once desired, bump master's locked revision:
|
2021-01-11 19:14:48 +00:00
|
|
|
# nix flake update --update-input master
|
2020-08-02 04:08:41 +00:00
|
|
|
master.url = "nixpkgs/master";
|
2020-12-02 03:16:04 +00:00
|
|
|
nixos.url = "nixpkgs/release-20.09";
|
|
|
|
home.url = "github:nix-community/home-manager/release-20.09";
|
2021-01-03 07:05:39 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils/flatten-tree-system";
|
2020-12-29 06:12:27 +00:00
|
|
|
devshell.url = "github:numtide/devshell";
|
2020-08-02 04:08:41 +00:00
|
|
|
};
|
2019-12-14 04:39:25 +00:00
|
|
|
|
2020-12-29 06:12:27 +00:00
|
|
|
outputs = inputs@{ self, home, nixos, master, flake-utils, nur, devshell }:
|
2020-01-04 05:06:31 +00:00
|
|
|
let
|
2021-01-03 07:05:39 +00:00
|
|
|
inherit (builtins) attrNames attrValues elem pathExists;
|
|
|
|
inherit (flake-utils.lib) eachDefaultSystem mkApp flattenTreeSystem;
|
2020-08-02 04:08:41 +00:00
|
|
|
inherit (nixos) lib;
|
2021-01-03 07:05:39 +00:00
|
|
|
inherit (lib) recursiveUpdate filterAttrs mapAttrs;
|
2020-12-25 19:53:57 +00:00
|
|
|
inherit (utils) pathsToImportedAttrs genPkgset overlayPaths modules
|
2020-12-28 04:19:45 +00:00
|
|
|
genPackages pkgImport;
|
2020-01-04 23:08:49 +00:00
|
|
|
|
2020-07-30 21:29:58 +00:00
|
|
|
utils = import ./lib/utils.nix { inherit lib; };
|
2020-06-01 23:14:33 +00:00
|
|
|
|
2020-12-29 06:12:27 +00:00
|
|
|
externOverlays = [ nur.overlay devshell.overlay ];
|
2020-12-28 22:07:15 +00:00
|
|
|
externModules = [ home.nixosModules.home-manager ];
|
2020-01-05 22:39:59 +00:00
|
|
|
|
2021-01-18 09:23:49 +00:00
|
|
|
pkgs' = unstable:
|
|
|
|
let
|
|
|
|
override = import ./pkgs/override.nix;
|
|
|
|
overlays = (attrValues self.overlays)
|
|
|
|
++ externOverlays
|
|
|
|
++ [ self.overlay (override unstable) ];
|
|
|
|
in
|
|
|
|
pkgImport nixos overlays;
|
|
|
|
|
|
|
|
unstable' = pkgImport master [ ];
|
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
osSystem = "x86_64-linux";
|
2020-01-02 02:24:09 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
outputs =
|
|
|
|
let
|
|
|
|
system = osSystem;
|
2021-01-18 09:23:49 +00:00
|
|
|
unstablePkgs = unstable' system;
|
|
|
|
osPkgs = pkgs' unstablePkgs system;
|
2021-01-03 07:05:39 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations =
|
|
|
|
import ./hosts (recursiveUpdate inputs {
|
2021-01-18 09:23:49 +00:00
|
|
|
inherit lib osPkgs unstablePkgs utils externModules system;
|
2021-01-03 07:05:39 +00:00
|
|
|
});
|
2020-07-14 02:00:47 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
overlay = import ./pkgs;
|
2020-01-02 02:24:09 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
overlays = pathsToImportedAttrs overlayPaths;
|
2020-01-02 02:24:09 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
nixosModules = modules;
|
2020-01-11 05:39:42 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
templates.flk.path = ./.;
|
2020-08-02 04:29:42 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
templates.flk.description = "flk template";
|
2020-08-02 04:29:42 +00:00
|
|
|
|
2021-01-03 07:05:39 +00:00
|
|
|
defaultTemplate = self.templates.flk;
|
|
|
|
};
|
2020-12-28 04:19:45 +00:00
|
|
|
in
|
2021-01-12 01:10:48 +00:00
|
|
|
recursiveUpdate
|
|
|
|
(eachDefaultSystem
|
|
|
|
(system:
|
|
|
|
let
|
2021-01-18 09:23:49 +00:00
|
|
|
unstablePkgs = unstable' system;
|
|
|
|
pkgs = pkgs' unstablePkgs system;
|
2020-12-29 03:33:26 +00:00
|
|
|
|
2021-01-12 01:10:48 +00:00
|
|
|
packages = flattenTreeSystem system
|
2021-01-03 07:05:39 +00:00
|
|
|
(genPackages {
|
|
|
|
inherit self pkgs;
|
2021-01-12 01:10:48 +00:00
|
|
|
});
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit packages;
|
2020-12-29 03:33:26 +00:00
|
|
|
|
2021-01-12 01:10:48 +00:00
|
|
|
devShell = import ./shell.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
outputs;
|
2019-12-03 05:18:30 +00:00
|
|
|
}
|