Fix substringing in lib/yggdrasil-hq.nix
This commit is contained in:
parent
5c204eec4d
commit
bd95ff2d6d
|
@ -4,7 +4,7 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.hq.yggdrasil;
|
cfg = config.hq.yggdrasil;
|
||||||
hostNameHash = builtins.hashString "sha256" config.networking.hostName;
|
hostNameHash = builtins.hashString "sha256" config.networking.hostName;
|
||||||
hextets = map (i: substring (4 * i) (4 * (i + 1)) hostNameHash) [ 0 1 2 3 ];
|
hextets = map (i: substring (4 * i) 4 hostNameHash) [ 0 1 2 3 ];
|
||||||
hostAddr = concatStringsSep ":" hextets;
|
hostAddr = concatStringsSep ":" hextets;
|
||||||
in {
|
in {
|
||||||
options = with types; {
|
options = with types; {
|
||||||
|
|
Loading…
Reference in New Issue