From 36b0692fb7dca966aba42fa093aab84913432ba8 Mon Sep 17 00:00:00 2001 From: tzlil Date: Thu, 13 Jul 2023 15:33:47 +0300 Subject: add nix shell function, format, add networkx to python repl --- mixins/cli.nix | 37 +++++++++++++++++++------------------ mixins/sway.nix | 1 + 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'mixins') diff --git a/mixins/cli.nix b/mixins/cli.nix index 1ef8b2e..14417b0 100644 --- a/mixins/cli.nix +++ b/mixins/cli.nix @@ -28,25 +28,27 @@ with ps; [ requests numpy + networkx more-itertools ])) ( - let hs = pkgs.ghc.withPackages (p: with p; [relude pretty-simple pointfree]); - in - pkgs.writeShellScriptBin "hs" '' - exec ${hs}/bin/ghci -ghci-script ${pkgs.writeText "ghci.conf" '' - :set -XNoImplicitPrelude - :set -XFlexibleContexts - :set -XFlexibleInstances - :set -XOverloadedStrings - :set -XAllowAmbiguousTypes - :set prompt "\ESC[38;5;208m\STXλ>\ESC[m\STX " - :set -ferror-spans -freverse-errors -fprint-expanded-synonyms - :set -interactive-print Text.Pretty.Simple.pPrint - :def pf \str -> return $ ":! ${hs}/bin/pointfree \"" ++ str ++ "\"" - import Relude''} - '' + let + hs = pkgs.ghc.withPackages (p: with p; [relude pretty-simple pointfree]); + in + pkgs.writeShellScriptBin "hs" '' + exec ${hs}/bin/ghci -ghci-script ${pkgs.writeText "ghci.conf" '' + :set -XNoImplicitPrelude + :set -XFlexibleContexts + :set -XFlexibleInstances + :set -XOverloadedStrings + :set -XAllowAmbiguousTypes + :set prompt "\ESC[38;5;208m\STXλ>\ESC[m\STX " + :set -ferror-spans -freverse-errors -fprint-expanded-synonyms + :set -interactive-print Text.Pretty.Simple.pPrint + :def pf \str -> return $ ":! ${hs}/bin/pointfree \"" ++ str ++ "\"" + import Relude''} + '' ) ]; sessionVariables = { @@ -75,9 +77,8 @@ b = "bat"; }; functions = { - sb.body = "nixos-rebuild build --flake git+ssh://pc/home/tzlil/newflake --use-remote-sudo"; - sw.body = "nixos-rebuild switch --flake git+ssh://pc/home/tzlil/newflake --use-remote-sudo"; - fish_greeting.body = ""; + fish_greeting = ""; + ns = "eval nix shell nixpkgs#\\{(string join \",\" $argv)\\}"; }; }; neovim = { diff --git a/mixins/sway.nix b/mixins/sway.nix index 5f74d46..84a8cc9 100644 --- a/mixins/sway.nix +++ b/mixins/sway.nix @@ -76,6 +76,7 @@ in { font-awesome_6 waypipe alsa-utils + wl-clipboard ]; programs.foot = { -- cgit 1.4.1