clanCore: init machine_id_v3

This commit is contained in:
Qubasa
2024-09-13 12:17:49 +02:00
parent 755010df8b
commit 787599ebb6
16 changed files with 346 additions and 197 deletions

View File

@@ -0,0 +1,3 @@
---
description = "Generates a uuid for use in disk device naming"
---

View File

@@ -0,0 +1,26 @@
{
config,
pkgs,
...
}:
{
config = {
clan.core.vars.generators.disk-id = {
files.diskId.secret = false;
runtimeInputs = [
pkgs.coreutils
pkgs.bash
];
script = ''
uuid=$(bash ${../uuid4.sh})
# Remove the hyphens from the UUID
uuid_no_hyphens=$(echo -n "$uuid" | tr -d '-')
echo -n "$uuid_no_hyphens" > "$out/diskId"
'';
};
};
}

View File

@@ -0,0 +1 @@
{ }