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 --- hosts/laptop/cfg.nix | 10 ++++++++-- hosts/vps/website.nix | 2 +- mixins/cli.nix | 37 +++++++++++++++++++------------------ mixins/sway.nix | 1 + 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/hosts/laptop/cfg.nix b/hosts/laptop/cfg.nix index 35dbde7..4e2f843 100644 --- a/hosts/laptop/cfg.nix +++ b/hosts/laptop/cfg.nix @@ -94,6 +94,12 @@ # networking.wireless.enable = true; # services.connman.enable = true; + services.tor = { + enable = true; + openFirewall = true; + client.enable = true; + torsocks.enable = true; + }; environment.persistence."/nix/persist".directories = [ "/etc/NetworkManager/system-connections" { @@ -112,7 +118,7 @@ home-manager.users.tzlil = { home.packages = [pkgs.schildichat-desktop-wayland pkgs.keepassxc]; programs.qutebrowser = { - enable = true; + enable = true; settings.colors.webpage.darkmode.enabled = true; }; }; @@ -175,6 +181,6 @@ virtualisation.docker.enable = true; virtualisation.docker.storageDriver = "btrfs"; - users.users.tzlil.extraGroups = [ "docker" ]; + users.users.tzlil.extraGroups = ["docker"]; }; } diff --git a/hosts/vps/website.nix b/hosts/vps/website.nix index edfaf57..2716aa5 100644 --- a/hosts/vps/website.nix +++ b/hosts/vps/website.nix @@ -113,7 +113,7 @@ google ctf 2023 - 96th place (solo) tfcctf 2022 - 4th place google ctf 2022 - 100th place - + contact info: tzlil:tzlil.net tzlils@protonmail.com 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