Config changes

This commit is contained in:
marc
2022-12-04 19:31:30 +01:00
parent 69e1dc2eb4
commit ccaca2cbe1
4 changed files with 32 additions and 45 deletions

View File

@@ -136,12 +136,13 @@
(load! "modules/prettify-utils.el") (load! "modules/prettify-utils.el")
(pretty-hook python-mode (pretty-hook python-mode
;; ("def" "𝙛") ("def" "")
;; ("class" "𝙘") ;; ("class" "𝙘")
'("None" "") ("None" "")
'("lambda" "λ") ("lambda" "λ")
'("not in" "") ("not in" "")
'("in" "")) ("in" ""))
(pretty-hook emacs-lisp-mode) (pretty-hook emacs-lisp-mode)

View File

@@ -13,15 +13,16 @@ check_template () {
if [ -z "$TEMPLATE" ]; then if [ -z "$TEMPLATE" ]; then
echo "No template given" echo "No template given"
list_templates list_templates
exit 1 return 1
elif [ ! -e "$TEMPLATES_DIR/$TEMPLATE" ]; then elif [ ! -e "$TEMPLATES_DIR/$TEMPLATE" ]; then
echo "The given template '$TEMPLATE' doesn't exist!" echo "The given template '$TEMPLATE' doesn't exist!"
list_templates list_templates
exit 1 return 1
fi fi
} }
devenv_install() { devenv_install() {
TEMPLATE=$1
install -m 644 $TEMPLATES_DIR/$TEMPLATE/* ./ install -m 644 $TEMPLATES_DIR/$TEMPLATE/* ./
echo "use flake . --impure" > .envrc echo "use flake . --impure" > .envrc
direnv allow direnv allow
@@ -29,22 +30,26 @@ devenv_install() {
devenv_init() { devenv_init() {
TEMPLATE=$1 TEMPLATE=$1
check_template $TEMPLATE if ! check_template $TEMPLATE ; then
devenv_install return 1
fi
devenv_install $TEMPLATE
} }
devenv_sandbox() { devenv_sandbox() {
DIRECTORY=$1 DIRECTORY=$1
if [ -z "$DIRECTORY" ]; then if [ -z "$DIRECTORY" ]; then
show_help_sandbox show_help_sandbox
exit 1 return 1
fi fi
SANDBOX_DIR="$SANDBOXES_DIR/$DIRECTORY" SANDBOX_DIR="$SANDBOXES_DIR/$DIRECTORY"
TEMPLATE=$2 TEMPLATE=$2
if [ -z "$TEMPLATE" ]; then if [ -z "$TEMPLATE" ]; then
TEMPLATE=$DIRECTORY TEMPLATE=$DIRECTORY
fi fi
check_template $TEMPLATE if ! check_template $TEMPLATE; then
return 1
fi
if [ ! -e $SANDBOX_DIR ]; then if [ ! -e $SANDBOX_DIR ]; then
echo "Creating sandbox at $SANDBOX_DIR with template $TEMPLATE" echo "Creating sandbox at $SANDBOX_DIR with template $TEMPLATE"
mkdir -p $SANDBOX_DIR mkdir -p $SANDBOX_DIR

View File

@@ -8,7 +8,10 @@
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
projectDependencies = with pkgs; [ python = pkgs.python39;
pythonPackages = pkgs.python39Packages;
projectDependencies = with pythonPackages; [
]; ];
in { in {
@@ -16,12 +19,19 @@
nativeBuildInputs = [ pkgs.bashInteractive ]; nativeBuildInputs = [ pkgs.bashInteractive ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# Core python dependencies # Core python dependencies
python39 python
python39Packages.pip pythonPackages.pip
python39Packages.virtualenv pythonPackages.virtualenv
# IDE tools
pythonPackages.isort
nodePackages.pyright
# Development tools # Development tools
python39Packages.ipython black
pythonPackages.ipython
pythonPackages.pytest
pythonPackages.setuptools
] ++ projectDependencies; ] ++ projectDependencies;
}; };
}); });
} }

View File

@@ -41,33 +41,6 @@ in {
libtool libtool
cmake cmake
# # :lang cc
# ccls
# cmake
# gcc
# glslang
# # :lang haskell
# stack
# haskellPackages.ghcide
# haskellPackages.hoogle
# # :lang latex && :lang org (latex preview)
# (texlive.combine { inherit (texlive) scheme-full; })
# # biber
# # :lang nix
# nixfmt
# # :lang python
# black
# python3
# python3Packages.isort
# # python3Packages.python-language-server
# python3Packages.pytest
# python3Packages.setuptools
# nodePackages.pyright
# # :tools lookup & :lang org +roam
# sqlite
# # :tools direnv
# direnv
# Fonts # Fonts
emacs-all-the-icons-fonts emacs-all-the-icons-fonts
# fira-code # fira-code
@@ -119,8 +92,6 @@ in {
system.userActivationScripts = { system.userActivationScripts = {
installDoomEmacs = '' installDoomEmacs = ''
EMACS_FOLDER="$HOME/.config/emacs" EMACS_FOLDER="$HOME/.config/emacs"
echo $XDG_CONFIG_HOME
echo $EMACS_FOLDER
if [ ! -d "$EMACS_FOLDER" ]; then if [ ! -d "$EMACS_FOLDER" ]; then
${pkgs.git}/bin/git clone --depth=1 --single-branch "https://github.com/doomemacs/doomemacs" "$EMACS_FOLDER" ${pkgs.git}/bin/git clone --depth=1 --single-branch "https://github.com/doomemacs/doomemacs" "$EMACS_FOLDER"
fi fi