mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
update channel script for flakes
This commit is contained in:
parent
538e6e5cf1
commit
8c566779be
1 changed files with 4 additions and 7 deletions
|
@ -58,15 +58,12 @@ in
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(writeShellScriptBin "channel" ''
|
(writeShellScriptBin "channel" ''
|
||||||
nixos="/nix/var/nix/profiles/per-user/root/channels/nixos"
|
branch="$(jq -r .nodes.nixpkgs.original.ref </etc/nixos/flake.lock)"
|
||||||
[[ "$(<$nixos/.version-suffix)" =~ ^pre ]] &&
|
|
||||||
channel="unstable" ||
|
|
||||||
channel="$(<$nixos/.version)"
|
|
||||||
echo
|
echo
|
||||||
echo "nixos-$channel"
|
echo "$branch"
|
||||||
echo
|
echo
|
||||||
echo "$(<$nixos/.git-revision) current local"
|
echo "$(jq -r .nodes.nixpkgs.locked.rev </etc/nixos/flake.lock) current local"
|
||||||
echo "$(curl --silent -L "https://channels.nixos.org/nixos-$channel/git-revision") latest available"
|
echo "$(git ls-remote https://github.com/NixOS/nixpkgs.git "$branch" | cut -f1) latest available"
|
||||||
echo
|
echo
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue