From Bas van Dijk:
To understand these things I would recommend using nix-repl:
$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
| # | |
| # Copyright (C) Andrei Belov (defanator@gmail.com) | |
| # | |
| # This is an example of direnv [1] .envrc file approaching the way | |
| # of using awscli [2] with MFA-enabled accounts in a (more or less) | |
| # secure manner. | |
| # | |
| # The following assumptions are expected: | |
| # | |
| # a) there should be two files, key.asc and skey.asc, containing |
| alias j="cd (cat ~/Library/autojump/autojump.txt | sort -nr | awk '{print \$2}' | fzf +s)" |
| {-# OPTIONS_GHC -fno-warn-deprecations #-} | |
| {-# OPTIONS_GHC -fno-warn-orphans #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| module Main (main) where | |
| import Control.Monad (when) | |
| import qualified Data.ByteString.Lazy as BL |