nix-shell -p yarn yarn2nix nodejs- copied the Nix skeleton files in place (./z/etc/lib/{version,nixpkgs}.nix ./z/etc/overlays/default.nix)
- generated
package.nixusingyarn2nix - add these Nix expressions in the root
| {-# LANGUAGE ExplicitForAll #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| module Profunctors where |
- the default
direnvNix integration from projects loads a Nix shell every new terminal or every timeshell.nixand/ordefault.nixchanges. On larger projects with a lot of Nix shell dependencies, that can cause the terminal to take more than 6 seconds to load, which significantly degrades the developer experience (DX). - when a developer garbage collects in their Nix store, often the Nix shell dependencies are deleted also which causes a slow start the next time the project’s Nix shell is requested, also degrading developer experience (DX).
- on first Nix shell load, the Nix shell is evaluated fully such that direnv dumps the environment from the spawn Nix shell process
The following shows that the latest nixos-unstable channel has all the transitive dependencies for
haskellPackages.lens available for fetching from the binary cache:
$ nix-env -f https://releases.nixos.org/nixos/unstable/nixos-18.09pre149415.8395f9aa85e/nixexprs.tar.xz \
-iA haskellPackages.lens --dry-run
(dry run; not doing anything)
installing 'lens-4.16.1'
these paths will be fetched (136.28 MiB download, 1899.17 MiB unpacked):
I recently installed NixOS from scratch on a new device and since I haven’t needed to do this in 1.5 years I forgot the sequence needed and made a whole bunch of mistakes.
It would be nice to be able to improve the experience and guide the user. On the other end of the installer UX are assisted installers which often use insecure defaults (e.g. for partitioning, or default passwds, etc).
nixos-help is potentially a valuable tool here but the documentation could use some attention in terms of organization, flow, and ensuring the documentation is updated to the current release of NixOS it is shipped with.
| { stdenv, fetchurl, gtk2, xorg, patchelf, unzip, makeWrapper, jre }: | |
| let version = "1.5.6"; in | |
| stdenv.mkDerivation rec { | |
| inherit version; | |
| name = "TLAToolBox-${version}"; | |
| src = fetchurl { | |
| url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.x86_64.zip"; | |
| sha256 = "1b5sf4d7sv0x1hg4f1if3q7wzsi09dr8fv71qfagj8m25zrh3lvj"; | |
| }; |
| # Put in your ~/.ssh/config | |
| ### Problem | |
| # | |
| # You are on a public WiFi network that blocks SSH ports but you don't want to switch | |
| # to pushing your Github changes to GH remotes via HTTPS nor do you want to change the | |
| # remote hostname in all your repos. | |
| Host github.com | |
| Hostname ssh.github.com |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| module FooBarBaz.Main | |
| ( compose3a | |
| , compose3b | |
| , compose3c | |
| , main | |
| ) where | |
| {- |
| #!/usr/bin/env bash | |
| function usage() { | |
| >&2 echo "Usage: $0 SOURCE_URL PROXY_URL" | |
| } | |
| function main() { | |
| local -r source_url="${1}" | |
| local -r proxy_url="${2}" | |
| curl \ |