also save git hash to nixos generations

This commit is contained in:
Osman Faruk Bayram 2024-10-17 00:19:19 +03:00
parent f20a9e2884
commit 1fbb779c9a
3 changed files with 6 additions and 4 deletions

View file

@ -4,7 +4,7 @@ The nix configuration of mine. I am trying to find a very suitable workplace for
But There are couple of things i need to do before:
- [ ] add git hash to the nixos build generations
- [x] add git hash to the nixos build generations
- [ ] fix cuda drivers
- [ ] fix nvidia-smi command
- [ ] compile a cuda program successfully

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, pkgs-unstable, ... }:
{ config, pkgs, pkgs-unstable, system-label, ... }:
{
imports =
@ -182,6 +182,7 @@
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
system.nixos.label = system-label;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions

View file

@ -14,15 +14,16 @@
...
}: {
nixosConfigurations = {
revision = self.shortRev or self.dirtyShortRev or self.lastModified or "unknown";
# revision = self.shortRev or self.dirtyShortRev or self.lastModified or "unknown";
tartarus = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [ ./configuration.nix ];
specialArgs = {
pkgs-unstable = import nixpkgs-unstable {
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
system-label = self.shortRev or self.dirtyShortRev or self.lastModified or "unknown";
};
};
};