mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +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
|
let
|
||||||
powerlineOpts = [
|
powerlineOpts = [
|
||||||
"-mode=flat"
|
"-mode=flat"
|
||||||
|
@ -59,12 +59,11 @@ in
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(writeShellScriptBin "channel" ''
|
(writeShellScriptBin "channel" ''
|
||||||
branch="$(jq -r .nodes.nixpkgs.original.ref </etc/nixos/flake.lock)"
|
|
||||||
echo
|
echo
|
||||||
echo "$branch"
|
echo "NixOS ${config.system.nixos.release} (${config.system.defaultChannel})"
|
||||||
echo
|
echo
|
||||||
echo "$(jq -r .nodes.nixpkgs.locked.rev </etc/nixos/flake.lock) current local"
|
echo "${config.system.nixos.revision} current local"
|
||||||
echo "$(git ls-remote https://github.com/NixOS/nixpkgs.git "$branch" | cut -f1) latest available"
|
echo "$(curl --silent -L ${config.system.defaultChannel}/git-revision) latest available"
|
||||||
echo
|
echo
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue