From 7148614dc5e12fc8076e30222c029664b797ae0b Mon Sep 17 00:00:00 2001 From: Tristan Druyen Date: Tue, 30 Jul 2024 20:23:37 +0200 Subject: [PATCH] Add image_id & version --- os-mods/common/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/os-mods/common/default.nix b/os-mods/common/default.nix index a2a8a6d..a79b49a 100644 --- a/os-mods/common/default.nix +++ b/os-mods/common/default.nix @@ -3,8 +3,21 @@ , pkgs , inputs , system +, self , ... -}: { +}: +let + commitid = + if (self ? shortRev) + then self.shortRev + else "dirty"; +in +{ + system.image = { + id = "tristnix"; + version = commitid; + }; + # system.nixos.tags = [ "tristnix_${commitid}" ]; nixpkgs.hostPlatform = lib.mkDefault system; nix = {