From 9bb6652055d2fd23c7fb9e4475523e7f3d259243 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 12 Feb 2025 06:37:14 +0000 Subject: [PATCH 1/4] Update pyshell template, remove fhsenv template pyshell sets up shell with python3Full and sets LD_LIBRARY_PATH. Shell hook checks and makes venv, installs standard packages. --- templates | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/templates b/templates index f498ae1..0730704 100644 --- a/templates +++ b/templates @@ -1,19 +1,15 @@ nix-mode -(fhsenv "let" n - > "pkgs = import " (p "") " { };" n - > "fhs = pkgs.buildFHSUserEnv {" n - > "name = \"" (p "env") "\";" n - > "targetPkgs = _: [ " q " ];" n - > "profile = \"\";" n - > "};" n - "in" n - > "fhs.env") - -(pyshell "import /etc/nixos/system/home/programming/pyshell.nix rec {" n +(pyshell "let" n > "pkgs = import " (p "") " { };" n - > "python3 = pkgs." (p "python311Full") ";" n - > "extraPackages = with pkgs; [ uv poetry pre-commit " q " ];" n + "in" n + "pkgs.mkShell {" n + > "packages = with pkgs; [ " (p "python3Full") " uv " q " ];" n + > "env.LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [stdenv.cc.cc.lib libz];" n + > "shellHook = ''" n + > "[ ! -d .venv/ ] && python3 -m venv --copies --without-pip --prompt $(basename $(readlink -f .)) .venv" n + > "[ -f .venv/bin/activate ] && source .venv/bin/activate && uv pip install pyflakes isort -e ." n + > "'';" n "}") python-base-mode From 96ae45c45311e0c0c3c8a6ddfbd02ca6b64fc9c8 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 12 Feb 2025 06:39:39 +0000 Subject: [PATCH 2/4] Set default text-mode fill-column to 100 --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 5706aa7..3affd09 100644 --- a/init.el +++ b/init.el @@ -427,7 +427,7 @@ (keymap-global-set "C-h K" #'describe-keymap) (use-package text-mode - :hook ((text-mode) . (lambda () (setq fill-column 120))) + :hook ((text-mode) . (lambda () (setq fill-column 100))) :custom (text-mode-ispell-word-completion nil)) From 27bb21de33be5472fcc4cd37b91c668a401dabee Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 12 Feb 2025 06:48:47 +0000 Subject: [PATCH 3/4] Reduce olivetti-minimum-body-width to match text-mode fill-column --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 3affd09..e8f9015 100644 --- a/init.el +++ b/init.el @@ -143,7 +143,7 @@ :hook (text-mode) :custom (olivetti-style nil) - (olivetti-minimum-body-width 120)) + (olivetti-minimum-body-width 100)) (use-package tramp :defines (tramp-remote-path tramp-default-proxies-alist) From 19dadbf97d152ad41b250e620a0fab2d9ec98289 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 12 Feb 2025 07:56:47 +0000 Subject: [PATCH 4/4] Set olivetti-minimum-body-width back to 120 --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index e8f9015..3affd09 100644 --- a/init.el +++ b/init.el @@ -143,7 +143,7 @@ :hook (text-mode) :custom (olivetti-style nil) - (olivetti-minimum-body-width 100)) + (olivetti-minimum-body-width 120)) (use-package tramp :defines (tramp-remote-path tramp-default-proxies-alist)