2021-05-04 04:20:12 +03:00
|
|
|
{
|
|
|
|
description = "DevOS environment configuriguration library.";
|
|
|
|
|
2021-07-16 22:54:47 +03:00
|
|
|
nixConfig.extra-experimental-features = "nix-command flakes ca-references";
|
|
|
|
nixConfig.extra-substituters = "https://nrdxp.cachix.org https://nix-community.cachix.org";
|
|
|
|
nixConfig.extra-trusted-public-keys = "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
|
|
|
|
|
2021-05-04 04:20:12 +03:00
|
|
|
inputs =
|
|
|
|
{
|
2021-07-06 10:15:45 +03:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/release-21.05";
|
|
|
|
nixlib.follows = "nixpkgs"; # "github:nix-community/nixpkgs.lib";
|
|
|
|
blank.url = "github:divnix/blank";
|
|
|
|
deploy.url = "github:serokell/deploy-rs";
|
|
|
|
deploy.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# deploy.inputs.utils.follows = "utils/flake-utils";
|
|
|
|
|
2021-07-13 01:31:05 +03:00
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixlib";
|
|
|
|
|
2021-05-04 04:20:12 +03:00
|
|
|
devshell.url = "github:numtide/devshell";
|
2021-09-05 11:55:46 +03:00
|
|
|
# fork with urgent fixes that can't be added quickly upstream in respect of upstream user base
|
|
|
|
flake-utils-plus.url = "github:divnix/flake-utils-plus";
|
2021-08-20 02:17:48 +03:00
|
|
|
nix.url = "github:nixos/nix";
|
|
|
|
nix.inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-06 10:15:45 +03:00
|
|
|
|
|
|
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
|
|
|
nixos-generators.inputs.nixpkgs.follows = "blank";
|
|
|
|
nixos-generators.inputs.nixlib.follows = "nixlib";
|
|
|
|
# nixos-generators.inputs.utils.follows = "utils/flake-utils";
|
|
|
|
|
|
|
|
# start ANTI CORRUPTION LAYER
|
|
|
|
# remove after https://github.com/NixOS/nix/pull/4641
|
|
|
|
# and uncomment the poper lines using "utils/flake-utils" above
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2021-07-21 02:24:39 +03:00
|
|
|
flake-utils-plus.inputs.flake-utils.follows = "flake-utils";
|
2021-07-06 10:15:45 +03:00
|
|
|
deploy.inputs.utils.follows = "flake-utils";
|
|
|
|
nixos-generators.inputs.utils.follows = "flake-utils";
|
|
|
|
# end ANTI CORRUPTION LAYER
|
2021-05-04 04:20:12 +03:00
|
|
|
};
|
|
|
|
|
2021-06-11 00:43:54 +03:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixlib
|
|
|
|
, nixpkgs
|
|
|
|
, deploy
|
|
|
|
, devshell
|
2021-07-21 02:24:39 +03:00
|
|
|
, flake-utils-plus
|
2021-06-11 00:43:54 +03:00
|
|
|
, nixos-generators
|
2021-07-13 01:31:05 +03:00
|
|
|
, home-manager
|
2021-08-20 02:17:48 +03:00
|
|
|
, nix
|
2021-06-11 00:43:54 +03:00
|
|
|
, ...
|
|
|
|
}@inputs:
|
2021-05-04 04:20:12 +03:00
|
|
|
let
|
2021-06-21 23:35:03 +03:00
|
|
|
|
2021-07-21 02:24:39 +03:00
|
|
|
tests = import ./src/tests.nix { inherit (nixpkgs) lib; };
|
|
|
|
|
|
|
|
internal-modules = import ./src/modules.nix {
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
inherit nixos-generators;
|
|
|
|
};
|
|
|
|
|
|
|
|
importers = import ./src/importers.nix {
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
};
|
|
|
|
|
|
|
|
generators = import ./src/generators.nix {
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
inherit deploy;
|
|
|
|
};
|
|
|
|
|
2021-07-21 05:38:14 +03:00
|
|
|
mkFlake =
|
|
|
|
let
|
|
|
|
mkFlake' = import ./src/mkFlake {
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
inherit (flake-utils-plus.inputs) flake-utils;
|
|
|
|
inherit deploy devshell home-manager flake-utils-plus internal-modules tests;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
__functor = _: args: (mkFlake' args).flake;
|
|
|
|
options = args: (mkFlake' args).options;
|
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
|
2021-06-21 23:35:03 +03:00
|
|
|
# Unofficial Flakes Roadmap - Polyfills
|
|
|
|
# .. see: https://demo.hedgedoc.org/s/_W6Ve03GK#
|
|
|
|
# .. also: <repo-root>/ufr-polyfills
|
|
|
|
|
|
|
|
# Super Stupid Flakes (ssf) / System As an Input - Style:
|
2021-07-16 23:40:39 +03:00
|
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
2021-06-21 23:35:03 +03:00
|
|
|
ufrContract = import ./ufr-polyfills/ufrContract.nix;
|
|
|
|
|
|
|
|
# Dependency Groups - Style
|
2021-07-21 02:24:39 +03:00
|
|
|
checksInputs = { inherit nixpkgs; digga = self; };
|
2021-06-21 23:35:03 +03:00
|
|
|
jobsInputs = { inherit nixpkgs; digga = self; };
|
2021-08-20 02:17:48 +03:00
|
|
|
devShellInputs = { inherit nixpkgs devshell nix; };
|
2021-06-21 23:35:03 +03:00
|
|
|
|
|
|
|
# .. we hope you like this style.
|
|
|
|
# .. it's adopted by a growing number of projects.
|
|
|
|
# Please consider adopting it if you want to help to improve flakes.
|
|
|
|
|
2021-07-21 02:24:39 +03:00
|
|
|
# DEPRECATED - will be removed timely
|
|
|
|
deprecated = import ./deprecated.nix {
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
inherit (self) nixosModules;
|
|
|
|
inherit flake-utils-plus internal-modules importers;
|
|
|
|
};
|
|
|
|
|
2021-05-04 04:20:12 +03:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2021-06-30 23:32:07 +03:00
|
|
|
# what you came for ...
|
2021-07-21 02:24:39 +03:00
|
|
|
lib = {
|
2021-09-04 02:00:48 +03:00
|
|
|
inherit (flake-utils-plus.inputs.flake-utils.lib) defaultSystems eachSystem eachDefaultSystem filterPackages;
|
|
|
|
inherit (flake-utils-plus.lib) exportModules exportOverlays exportPackages;
|
2021-07-21 02:24:39 +03:00
|
|
|
inherit mkFlake;
|
|
|
|
inherit (tests) mkTest;
|
|
|
|
inherit (importers) flattenTree rakeLeaves importOverlays importModules importHosts;
|
|
|
|
inherit (generators) mkDeployNodes mkHomeConfigurations;
|
|
|
|
|
|
|
|
# DEPRECATED - will be removed soon
|
|
|
|
inherit (deprecated)
|
|
|
|
mkSuites
|
|
|
|
profileMap
|
|
|
|
mkProfileAttrs
|
|
|
|
exporters
|
|
|
|
modules
|
|
|
|
importers
|
|
|
|
;
|
|
|
|
|
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
|
2021-06-30 23:22:21 +03:00
|
|
|
# a little extra service ...
|
2021-08-20 02:17:48 +03:00
|
|
|
overlays = import ./overlays { inherit inputs; };
|
2021-07-16 23:54:02 +03:00
|
|
|
nixosModules = import ./modules;
|
2021-06-30 23:22:21 +03:00
|
|
|
|
2021-06-20 05:42:51 +03:00
|
|
|
# digga-local use
|
2021-07-16 23:40:39 +03:00
|
|
|
jobs = ufrContract supportedSystems ./jobs jobsInputs;
|
|
|
|
checks = ufrContract supportedSystems ./checks checksInputs;
|
2021-06-21 23:35:03 +03:00
|
|
|
devShell = ufrContract supportedSystems ./shell.nix devShellInputs;
|
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
|
|
|
|
}
|