nixos/system/label.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
465 B
Nix
Raw Normal View History

2024-10-04 15:40:16 +00:00
{
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;
2024-10-06 12:40:01 +00:00
label = flakeRevCount + "-" + flakeRev;
2024-10-04 15:40:16 +00:00
in
{
system.nixos.tags = [
tagGit
tagMod
];
system.nixos.label = label;
}