From 1d9c086a719b8cc0d963f195c789179329565955 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Thu, 1 Oct 2020 11:40:28 -0400 Subject: [PATCH] convert "channel" from alias to script --- modules/cli.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/cli.nix b/modules/cli.nix index cc86616..5ccf66d 100644 --- a/modules/cli.nix +++ b/modules/cli.nix @@ -44,6 +44,13 @@ if ln.startswith('size '): print(str(int(ln.split(' ')[-1])/(1024*1024*1024))[:5],'GB') '') + + (writeScriptBin "channel" '' + #!/bin/sh + echo "$(curl --silent -L https://channels.nixos.org/nixos-20.09/git-revision)" nixos-20.09 + echo "$(cat /nix/var/nix/profiles/per-user/root/channels/nixos/.git-revision)" nixos local + echo "$(curl --silent -L https://channels.nixos.org/nixos-unstable/git-revision)" nixos-unstable + '') ]; virtualisation.podman.enable = true; @@ -57,12 +64,6 @@ alias p=python3 alias buildsys='nix build -f "" --no-link system' - alias channel=' - echo "$(curl --silent -L https://channels.nixos.org/nixos-20.09/git-revision)" nixos-20.09;\ - echo "$(cat /nix/var/nix/profiles/per-user/root/channels/nixos/.git-revision)" local nixos;\ - echo "$(curl --silent -L https://channels.nixos.org/nixos-unstable/git-revision) nixos-unstable" - ' - function _update_ps1() { PS1="\n$(${pkgs.callPackage ../pkgs/powerline-go-updated { }}/bin/powerline-go \ -mode=flat \