mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
optimize channel script
This commit is contained in:
parent
66b39dcfb6
commit
473801bbdb
1 changed files with 4 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
powerlineOpts = [
|
||||
"-mode=flat"
|
||||
|
@ -59,12 +59,11 @@ in
|
|||
'')
|
||||
|
||||
(writeShellScriptBin "channel" ''
|
||||
branch="$(jq -r .nodes.nixpkgs.original.ref </etc/nixos/flake.lock)"
|
||||
echo
|
||||
echo "$branch"
|
||||
echo "NixOS ${config.system.nixos.release} (${config.system.defaultChannel})"
|
||||
echo
|
||||
echo "$(jq -r .nodes.nixpkgs.locked.rev </etc/nixos/flake.lock) current local"
|
||||
echo "$(git ls-remote https://github.com/NixOS/nixpkgs.git "$branch" | cut -f1) latest available"
|
||||
echo "${config.system.nixos.revision} current local"
|
||||
echo "$(curl --silent -L ${config.system.defaultChannel}/git-revision) latest available"
|
||||
echo
|
||||
'')
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue