mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nixosSystem: Automatically set version suffix from flake
E.g. $ nixos-version 19.03.20190913.af5eb77 (Koi)
This commit is contained in:
parent
22cc7ab78c
commit
b91803bf13
13
flake.nix
13
flake.nix
@ -9,10 +9,19 @@
|
||||
jobs = import ./pkgs/top-level/release.nix {
|
||||
nixpkgs = self;
|
||||
};
|
||||
lib = import ./lib;
|
||||
in
|
||||
{
|
||||
lib = (import ./lib) // {
|
||||
nixosSystem = import ./nixos/lib/eval-config.nix;
|
||||
lib = lib // {
|
||||
nixosSystem = { modules, ... } @ args:
|
||||
import ./nixos/lib/eval-config.nix (args // {
|
||||
modules = modules ++
|
||||
[ { system.nixos.versionSuffix =
|
||||
".${lib.substring 0 8 self.lastModified}.${self.shortRev}";
|
||||
system.nixos.revision = self.rev;
|
||||
}
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
checks.tarball = jobs.tarball;
|
||||
|
Loading…
Reference in New Issue
Block a user