nixos/system/label.nix
Torjus Håkestad 73ffdfb5fe
All checks were successful
Run nix flake check / flake-check (push) Successful in 2m41s
Periodic flake update / flake-update (push) Successful in 1m18s
Change label
2024-10-06 14:40:01 +02:00

20 lines
465 B
Nix

{
self,
...
}:
let
flakeRev = if (self ? shortRev) then self.shortRev else "dirty";
flakeMod = if (self ? lastModifiedDate) then self.lastModifiedDate else "";
flakeRevCount = if (self ? revCount) then builtins.toString self.revCount else "";
tagGit = "rev:" + flakeRev + ":" + flakeRevCount;
tagMod = "mod:" + flakeMod;
label = flakeRevCount + "-" + flakeRev;
in
{
system.nixos.tags = [
tagGit
tagMod
];
system.nixos.label = label;
}