Skip to content

Commit 199bcb9

Browse files
authored
Merge pull request #120 from Swarsel/fix/nodeBoundary
2 parents a15cac7 + f566e10 commit 199bcb9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/complex/flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@
112112

113113
containers.test.config = {
114114
imports = [ nix-topology.nixosModules.default ];
115-
networking.hostName = "host2-test";
115+
networking.hostName = "host2-test-with-a-long-name";
116116
};
117117

118118
# We can change our own node's topology settings from here:
119119
topology.self = {
120120
name = "☄️  Powerful host2";
121-
hardware.info = "2U Server with loads of RAM";
121+
hardware.info = "2U Server with loads of RAM and a really long description";
122122
interfaces.wg0 = {
123123
addresses = [ "10.0.0.2" ];
124124
# Rendering virtual connections such as wireguard connections can sometimes

topology/renderers/svg/default.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ let
231231
html = mkCardContainer /* html */ ''
232232
<div tw="flex flex-row mx-6 mt-2 items-center">
233233
${mkImageMaybe "w-8 h-8 mr-4" (config.lib.icons.get node.icon)}
234-
<div tw="flex flex-col min-h-18 justify-center">
234+
<div tw="flex flex-col min-h-18 justify-center flex-1 min-w-0">
235235
<span tw="text-2xl font-bold">${node.name}</span>
236236
${optionalString (
237237
node.hardware.info != null
238238
) ''<span tw="text-xs">${node.hardware.info}</span>''}
239239
</div>
240-
<div tw="flex grow min-w-8"></div>
240+
<div tw="flex min-w-8"></div>
241241
${mkImageMaybe "w-12 h-12 ml-4" (config.lib.icons.get node.deviceIcon)}
242242
</div>
243243
@@ -263,7 +263,7 @@ let
263263
mkRootContainer "items-center" /* html */ ''
264264
<div tw="flex flex-row mx-6 mt-2 items-center">
265265
${mkImageMaybe "w-8 h-8 mr-4" (config.lib.icons.get node.icon)}
266-
<div tw="flex flex-col min-h-18 justify-center">
266+
<div tw="flex flex-col min-h-18 justify-center flex-1 min-w-0">
267267
<span tw="text-2xl font-bold">${node.name}</span>
268268
${optionalString (
269269
node.hardware.info != null
@@ -272,7 +272,7 @@ let
272272
${optionalString
273273
(deviceIconImage != null && node.hardware.image != null -> deviceIconImage != node.hardware.image)
274274
''
275-
<div tw="flex grow min-w-4"></div>
275+
<div tw="flex min-w-4"></div>
276276
${mkImageMaybe "w-12 h-12" deviceIconImage}
277277
''
278278
}

0 commit comments

Comments
 (0)