diff --git a/modules/config/nix.nix b/modules/config/nix.nix
index a3f4e66..9222f9a 100644
--- a/modules/config/nix.nix
+++ b/modules/config/nix.nix
@@ -16,12 +16,10 @@
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
- "https://nix-config.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
- "nix-config.cachix.org-1:Vd6raEuldeIZpttVQfrUbLvXJHzzzkS0pezXCVVjDG4="
];
cores = 0;
max-jobs = "auto";
diff --git a/pkgs/html-to-svg/default.nix b/pkgs/html-to-svg/default.nix
index 201954d..4ca5030 100644
--- a/pkgs/html-to-svg/default.nix
+++ b/pkgs/html-to-svg/default.nix
@@ -2,7 +2,7 @@
buildNpmPackage,
lib,
}:
-buildNpmPackage rec {
+buildNpmPackage {
pname = "html-to-svg";
version = "1.0.0";
diff --git a/topology/options/services.nix b/topology/options/services.nix
index 24918b3..4851d3f 100644
--- a/topology/options/services.nix
+++ b/topology/options/services.nix
@@ -35,7 +35,7 @@ in
hidden = mkOption {
description = "Whether this service should be hidden from graphs";
- default = true;
+ default = false;
type = types.bool;
};
diff --git a/topology/topology/default.nix b/topology/topology/default.nix
index cc2a0da..e295283 100644
--- a/topology/topology/default.nix
+++ b/topology/topology/default.nix
@@ -57,6 +57,14 @@ in {
defaultText = literalExpression ''config.renderers.${config.renderer}.output'';
};
+ lib = lib.mkOption {
+ default = {};
+ type = lib.types.attrsOf lib.types.attrs;
+ description = lib.mdDoc ''
+ This option allows modules to define helper functions, constants, etc.
+ '';
+ };
+
assertions = mkOption {
internal = true;
default = [];
diff --git a/topology/topology/renderers/d2/default.nix b/topology/topology/renderers/d2/default.nix
index 9e7e77a..315a6a0 100644
--- a/topology/topology/renderers/d2/default.nix
+++ b/topology/topology/renderers/d2/default.nix
@@ -17,7 +17,7 @@ in {
};
};
- config.renderers.d2.output = pkgs.runCommand "build-d2-topology" {} ''
+ config.renderers.d2.output = pkgs.runCommand "topology-d2" {} ''
mkdir -p $out
# cp ${import ./network.nix args} $out/network.d2
ln -s ${import ./network.nix args} $out/svgs
diff --git a/topology/topology/renderers/d2/network.nix b/topology/topology/renderers/d2/network.nix
index b2fec5a..1e406a2 100644
--- a/topology/topology/renderers/d2/network.nix
+++ b/topology/topology/renderers/d2/network.nix
@@ -8,50 +8,8 @@
(lib)
attrValues
concatLines
- filter
- hasSuffix
- head
- optionalString
- splitString
- tail
;
- getIcon = registry: iconName:
- if iconName == null
- then null
- else config.icons.${registry}.${iconName}.file or null;
-
- mkImage = twAttrs: file:
- if file == null
- then ''
-
- ''
- else if hasSuffix ".svg" file
- then let
- withoutPrefix = head (tail (splitString "