Nix Snippets
I use direnv to automatically get into flake shell as soon as I entre the directory which contain the flake.nix, the content of .envrc file is: use flake Most of the time I just need to use the package available in my shell for my dev work and the snipet that I use is: { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; buildInputs = with pkgs; [ # package1 # package2 ]; in with pkgs; { devShells.default = mkShell { inherit buildInputs; }; } ); } Sometime I write custom scrips that I need access to, I can create a nixified version using the writeShellApplication which is one of the trivial builders. Bottom is just a simple shell script to get the authentication code simlar to google-authenticator: ...