diff options
Diffstat (limited to 'modules/by-name/ve')
-rw-r--r-- | modules/by-name/ve/version/module.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/by-name/ve/version/module.nix b/modules/by-name/ve/version/module.nix new file mode 100644 index 00000000..77cada14 --- /dev/null +++ b/modules/by-name/ve/version/module.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + self, + ... +}: let + cfg = config.soispha.version; +in { + options.soispha.version = { + enable = lib.mkEnableOption "storing the git revision in /etc/nixos_git_rev"; + }; + config = lib.mkIf cfg.enable { + environment.etc.nixos_git_rev = { + text = builtins.toString (self.longRev + or self.lastModified + or "unknown"); + }; + }; +} |