add tools

This commit is contained in:
Max Headroom 2021-10-16 17:00:47 +02:00
parent b7f20f6199
commit f95f2d389b
4 changed files with 19 additions and 2 deletions

View file

@ -42,11 +42,14 @@
aspect = import ./modules inputs; aspect = import ./modules inputs;
hosts = import ./hosts; hosts = import ./hosts;
specialArgs = { inherit inputs hosts aspect; }; specialArgs = {
inherit inputs hosts aspect;
toolsets = import ./tools;
};
mkNixOS' = lib: name: lib.nixosSystem { mkNixOS' = lib: name: lib.nixosSystem {
inherit system; inherit system;
inherit specialArgs; inherit specialArgs;
modules = [ hosts."${name}".nixos ]; modules = [ hosts."${name}".nixos ./tools/inject.nix ];
}; };
mkNixOS = mkNixOS' lib; mkNixOS = mkNixOS' lib;
in { in {

6
tools/default.nix Normal file
View file

@ -0,0 +1,6 @@
let toolsets = {
meta = import ./meta.nix;
};
in toolsets // {
all = args: (builtins.mapAttrs (_: x: x args) toolsets) // { inherit (toolsets) meta; };
}

4
tools/inject.nix Normal file
View file

@ -0,0 +1,4 @@
{ pkgs, lib, config, ... }:
{
_module.args.tools = (import ./.).all { inherit pkgs lib config; };
}

4
tools/meta.nix Normal file
View file

@ -0,0 +1,4 @@
rec {
domain = "privatevoid.net";
adminEmail = "admins@${domain}";
}