diff options
author | Soispha <soispha@vhack.eu> | 2024-02-23 18:20:02 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-02-23 18:20:02 +0100 |
commit | 1fd3abb79f7e2f523b6c1714a03025dea912a12f (patch) | |
tree | 2b54b7303d5bc770178c6b0e6cf86eb5d4ecf05c | |
parent | chore(version): v1.30.0 (diff) | |
download | nixos-config-1fd3abb79f7e2f523b6c1714a03025dea912a12f.tar.gz nixos-config-1fd3abb79f7e2f523b6c1714a03025dea912a12f.zip |
feat(sys/nixos_git_rev): Add a file with the current git reverence
-rw-r--r-- | sys/default.nix | 7 | ||||
-rw-r--r-- | sys/git_revision/default.nix | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/default.nix b/sys/default.nix index e72b300a..68a24892 100644 --- a/sys/default.nix +++ b/sys/default.nix @@ -1,15 +1,16 @@ {lib, ...}: { imports = [ + #./nixpkgs already at flake level imported ./boot ./disks ./documentation ./font + ./git_revision ./hardware ./impermanence ./libvirtd ./locale ./network - #./nixpkgs already at flake level imported ./options ./polkit ./power @@ -17,10 +18,10 @@ ./sound ./svcs ./tempfiles - ./users # the position of this item is fully arbitrary + ./users ./waydroid ]; - # remove all the bloat, which nixos installs by default + # remove all the bloat, which NixOS installs by default environment = { defaultPackages = lib.mkForce []; }; diff --git a/sys/git_revision/default.nix b/sys/git_revision/default.nix new file mode 100644 index 00000000..d9388bfa --- /dev/null +++ b/sys/git_revision/default.nix @@ -0,0 +1,8 @@ +{self, ...}: { + environment.etc.nixos_git_rev = { + text = builtins.toString (self.shortRev + or self.dirtyShortRev + or self.lastModified + or "unknown"); + }; +} |