Created
January 8, 2019 00:56
-
-
Save dtzWill/59c1e5ab4af627a27a3a3af8197d9c95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
rec { | |
optslist = ./options.json; | |
fzfopts = pkgs.writeShellScriptBin "fzfopts" '' | |
cat ${optslist} | ${pkgs.jq}/bin/jq "keys[]" -r | fzf \ | |
--reverse \ | |
--prompt="NixOS Options> " \ | |
--preview="echo -e \"{1}\n\"; nixos-option {1}" \ | |
--preview-window=wrap | |
''; | |
gfzfopts = pkgs.writeShellScriptBin "gfzfopts" '' | |
termite -e "zsh -ic ${fzfopts}/bin/fzfopts" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment