20 lines
456 B
Nix
20 lines
456 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 = tagGit + "_" + tagMod;
|
||
|
in
|
||
|
{
|
||
|
system.nixos.tags = [
|
||
|
tagGit
|
||
|
tagMod
|
||
|
];
|
||
|
system.nixos.label = label;
|
||
|
}
|