From 1cc877bddb9ad1f097eeb64e0921bc1fbed5d82c Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Tue, 14 May 2024 06:57:27 +0200 Subject: [PATCH] unstable-packages: store version in system derivation output --- nix-os/unstable-packages.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix-os/unstable-packages.nix b/nix-os/unstable-packages.nix index 67f0f5b..27e0727 100644 --- a/nix-os/unstable-packages.nix +++ b/nix-os/unstable-packages.nix @@ -31,6 +31,7 @@ in }; }; config._module.args.unstablePkgs = config.unstable.pkgs; - # FIXME: move it to the system derivation output (overrideAttrs config.system.build.toplevel?) - config.environment.etc."NIXOS-UNSTABLE-VERSION".text = nixos-unstable-version; + config.system.extraSystemBuilderCmds = lib.mkIf config.unstable.enable '' + echo ${nixos-unstable-version} > $out/nixos-unstable-version + ''; } \ No newline at end of file