diff --git a/flake.nix b/flake.nix index c9eede0..0ccc1c7 100644 --- a/flake.nix +++ b/flake.nix @@ -124,6 +124,19 @@ "abort generators.toDhall: unhandled value (${x})"; }; + uuidFrom = seed: + let digest = builtins.hashString "sha256" seed; + in (lib.lists.foldl ({ str, off }: + n: + let chunk = builtins.substring off n digest; + in { + str = if off == 0 then chunk else "${str}-${chunk}"; + off = off + n; + }) { + str = ""; + off = 0; + } [ 8 4 4 4 12 ]).str; + nixosSystem = # A derivative of the function for generating Linux NixOS systems. # This one is not so well tested…