2021-05-04 04:20:12 +03:00
|
|
|
{
|
|
|
|
description = "DevOS environment configuriguration library.";
|
|
|
|
|
2021-12-08 22:59:36 +03:00
|
|
|
nixConfig.extra-experimental-features = "nix-command flakes";
|
2021-07-16 22:54:47 +03:00
|
|
|
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-11-26 11:57:51 +03:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
|
2021-09-30 02:34:00 +03:00
|
|
|
latest.url = "github:nixos/nixpkgs/nixos-unstable";
|
2022-01-15 02:29:19 +03:00
|
|
|
nixlib.url = "github:nix-community/nixpkgs.lib";
|
2021-07-06 10:15:45 +03:00
|
|
|
blank.url = "github:divnix/blank";
|
2022-01-15 02:29:19 +03:00
|
|
|
|
2021-07-06 10:15:45 +03:00
|
|
|
deploy.url = "github:serokell/deploy-rs";
|
2021-09-30 02:34:00 +03:00
|
|
|
deploy.inputs.nixpkgs.follows = "latest";
|
2021-07-06 10:15:45 +03:00
|
|
|
|
2021-11-30 01:38:35 +03:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
2022-01-15 02:29:19 +03:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixlib";
|
2021-07-13 01:31:05 +03:00
|
|
|
|
2021-05-04 04:20:12 +03:00
|
|
|
devshell.url = "github:numtide/devshell";
|
2022-01-14 09:01:33 +03:00
|
|
|
flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
2021-07-06 10:15:45 +03:00
|
|
|
|
2022-01-31 00:30:31 +03:00
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
};
|
|
|
|
|
2021-06-11 00:43:54 +03:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixlib
|
|
|
|
, nixpkgs
|
2021-09-30 02:34:00 +03:00
|
|
|
, latest
|
2021-06-11 00:43:54 +03:00
|
|
|
, deploy
|
|
|
|
, devshell
|
2021-07-21 02:24:39 +03:00
|
|
|
, flake-utils-plus
|
2021-07-13 01:31:05 +03:00
|
|
|
, home-manager
|
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
|
|
|
|
2022-01-15 02:29:19 +03:00
|
|
|
tests = import ./src/tests.nix { inherit (nixlib) lib; };
|
2021-07-21 02:24:39 +03:00
|
|
|
|
|
|
|
internal-modules = import ./src/modules.nix {
|
2022-01-15 02:29:19 +03:00
|
|
|
inherit (nixlib) lib;
|
2021-07-21 02:24:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
importers = import ./src/importers.nix {
|
2022-01-15 02:29:19 +03:00
|
|
|
inherit (nixlib) lib;
|
2021-07-21 02:24:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
generators = import ./src/generators.nix {
|
2022-01-15 02:29:19 +03:00
|
|
|
inherit (nixlib) lib;
|
2021-07-21 02:24:39 +03:00
|
|
|
inherit deploy;
|
|
|
|
};
|
|
|
|
|
2021-07-21 05:38:14 +03:00
|
|
|
mkFlake =
|
|
|
|
let
|
|
|
|
mkFlake' = import ./src/mkFlake {
|
2022-01-15 02:29:19 +03:00
|
|
|
inherit (nixlib) lib;
|
2021-07-21 05:38:14 +03:00
|
|
|
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
|
2022-01-31 00:30:31 +03:00
|
|
|
# This project is committed to the Unofficial Flakes Roadmap!
|
2021-06-21 23:35:03 +03:00
|
|
|
# .. see: https://demo.hedgedoc.org/s/_W6Ve03GK#
|
|
|
|
|
|
|
|
# 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
|
|
|
|
2022-01-31 00:30:31 +03:00
|
|
|
# Pass this flake(self) as "digga"
|
|
|
|
polyfillInputs = self.inputs // { digga = self; };
|
|
|
|
polyfillOutput = loc: nixlib.lib.genAttrs supportedSystems (system:
|
|
|
|
import loc { inherit system; inputs = polyfillInputs; }
|
|
|
|
);
|
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.
|
|
|
|
|
2022-01-31 00:30:31 +03:00
|
|
|
|
|
|
|
|
2021-07-21 02:24:39 +03:00
|
|
|
# DEPRECATED - will be removed timely
|
|
|
|
deprecated = import ./deprecated.nix {
|
2022-01-15 02:29:19 +03:00
|
|
|
inherit (nixlib) lib;
|
2021-07-21 02:24:39 +03:00
|
|
|
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;
|
2021-09-05 13:06:32 +03:00
|
|
|
inherit (tests) mkTest allProfilesTest;
|
2021-09-24 21:52:37 +03:00
|
|
|
inherit (importers) flattenTree rakeLeaves importOverlays importExportableModules importHosts;
|
2021-07-21 02:24:39 +03:00
|
|
|
inherit (generators) mkDeployNodes mkHomeConfigurations;
|
|
|
|
|
|
|
|
# DEPRECATED - will be removed soon
|
|
|
|
inherit (deprecated)
|
2022-02-28 04:50:59 +03:00
|
|
|
# Place any deprecated lib functions here
|
2021-07-21 02:24:39 +03:00
|
|
|
;
|
|
|
|
|
|
|
|
};
|
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
|
|
|
|
2022-02-24 05:57:22 +03:00
|
|
|
defaultTemplate = self.templates.devos;
|
|
|
|
templates.devos.path = ./examples/devos;
|
|
|
|
templates.devos.description = ''
|
|
|
|
an awesome template for NixOS users, with consideration for common tools like home-manager, devshell, and more.
|
|
|
|
'';
|
|
|
|
|
2021-06-20 05:42:51 +03:00
|
|
|
# digga-local use
|
2022-01-31 00:30:31 +03:00
|
|
|
# system-space and pass sytem and input to each file
|
|
|
|
jobs = polyfillOutput ./jobs;
|
|
|
|
checks = polyfillOutput ./checks;
|
2022-04-03 20:12:00 +03:00
|
|
|
devShell = polyfillOutput ./devShell.nix;
|
2021-06-21 23:35:03 +03:00
|
|
|
};
|
2021-05-04 04:20:12 +03:00
|
|
|
|
|
|
|
}
|