From 91d43cb4f4626aedabcb3588da8984ffaf3346d2 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:03:19 -0500 Subject: instant devshells --- hosts/mercury/hjem.nix | 60 +++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 28 deletions(-) (limited to 'hosts/mercury/hjem.nix') diff --git a/hosts/mercury/hjem.nix b/hosts/mercury/hjem.nix index 75784d4..aceb772 100644 --- a/hosts/mercury/hjem.nix +++ b/hosts/mercury/hjem.nix @@ -1,9 +1,37 @@ -{pkgs, ...}: { +{pkgs, ...}: let + rust-shell = let + rustProfile = pkgs.buildEnv { + name = "rust-profile"; + paths = with pkgs; [rustc cargo rust-analyzer]; + }; + in + pkgs.writeShellScriptBin "rust-shell" '' + export PATH="${rustProfile}/bin:$PATH" + export RUST_BACKTRACE=1 + exec $SHELL + ''; + + py-shell = let + pythonProfile = pkgs.python314.withPackages (ps: + with ps; [ + numpy + matplotlib + pandas + jupyter + ipython + ]); + in + pkgs.writeShellScriptBin "py-shell" '' + export PATH="${pythonProfile}/bin:$PATH" + export PYTHONSTARTUP="" + exec $SHELL + ''; +in { packages = with pkgs; [ anki libreoffice-qt musescore - obsidian + vscodium noctalia-shell @@ -11,33 +39,9 @@ mpv irssi - opencode - (pkgs.callPackage ../../pkgs/yo {}) - captive-browser # https://words.filippo.io/captive-browser - (pkgs.makeDesktopItem { - name = "captive-browser"; - desktopName = "Captive Browser"; - exec = "${pkgs.captive-browser}/bin/captive-browser"; - icon = "web-browser"; - terminal = false; - categories = ["Application"]; - }) + rust-shell + py-shell ]; - - files.".config/captive-browser.toml".text = '' - browser = """ - ${pkgs.ungoogled-chromium}/bin/chromium \ - --proxy-server="socks5://$PROXY" \ - --no-default-browser-check \ - --no-first-run \ - --no-managed-user-acknowledgment-check \ - --app=http://neverssl.com - """ - - dhcp-dns = "echo 10.0.5.82" - - socks5-addr = "localhost:1666" - ''; } -- cgit v1.3.1