forked from mirrors/nixpkgs
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 a new issue