mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
remove hardcodes from "channel" script
This commit is contained in:
parent
f5eb7d7efa
commit
217e63bbf7
1 changed files with 7 additions and 3 deletions
|
@ -47,9 +47,13 @@
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(writeShellScriptBin "channel" ''
|
(writeShellScriptBin "channel" ''
|
||||||
echo "$(curl --silent -L https://channels.nixos.org/nixos-20.09/git-revision)" nixos-20.09
|
nixos="/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||||
echo "$(cat /nix/var/nix/profiles/per-user/root/channels/nixos/.git-revision)" nixos local
|
[[ "$(<$nixos/.version-suffix)" =~ ^pre ]] &&
|
||||||
echo "$(curl --silent -L https://channels.nixos.org/nixos-unstable/git-revision)" nixos-unstable
|
channel="unstable" ||
|
||||||
|
channel="$(<$nixos/.version)"
|
||||||
|
echo "nixos-$channel"
|
||||||
|
echo "$(<$nixos/.git-revision) current local"
|
||||||
|
echo "$(curl --silent -L "https://channels.nixos.org/nixos-$channel/git-revision") latest available"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue