hook global BufSetOption filetype=(?:nix) %{ define-snippet buffer snip-flake-mkderivation define-snippet buffer snip-flake-mkshell } define-command snip-flake-mkderivation %{ prompt 'pname: ' %{ set-register c %val{text} execute-keys ',istdenv.mkDerivation {' execute-keys ' pname = "c";' execute-keys ' version = "0.0.0";' execute-keys ' src = fetchGithub {' execute-keys ' owner = "owner";' execute-keys ' repo = "repo";' execute-keys ' rev = "master";' execute-keys ' hash = lib.fakeHash;' execute-keys ' };' execute-keys '}' } } define-command snip-flake-mkshell %{ execute-keys ',ipkgs.mkShell {' execute-keys ' buildInputs = with pkgs; [];' execute-keys '}' }