From 8004d0a9930b0e2caa9a9d5fa1ec3052a24a7f7a Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Sun, 22 Sep 2024 12:00:22 +0000 Subject: [PATCH] some adjustments + vagrant with nix --- .bashrc | 9 ++++----- .config/nix/dev.nix | 9 +++------ .zshrc | 10 +++++++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.bashrc b/.bashrc index 0a90bfb..d0628d4 100644 --- a/.bashrc +++ b/.bashrc @@ -1,9 +1,5 @@ # Idempotent configs -# To allow some scripts to determine which shell they're running in -BASH_VERSION=$(bash --version) -export BASH_VERSION - # kube config if [ "${KUBECONFIG/:*}" = "$HOME/.kube/config" ] then @@ -14,6 +10,9 @@ then export KUBE_FUZZY_PREVIEW_ENABLED=true fi +NIXPKGS_ALLOW_UNFREE=1 +export NIXPKGS_ALLOW_UNFREE + # Prevent double .bashrc sourcing in different files if { test "${TMUX}" != "" && test "${TMUX_BASHRC_ALREADY_EXECUTED}" = ""; } || test "$BASHRC_ALREADY_EXECUTED" = "" then @@ -433,7 +432,7 @@ then then PS1=$PS1'$(KUBECTL_CONTEXT=$(kubectl config current-context 2>/dev/null);' PS1=$PS1'KUBECTL_NAMESPACE=$(kubectl config view -o jsonpath="{.contexts[?(@.context.cluster == '"'"'${KUBECTL_CONTEXT}'"'"')].context.namespace}" 2>/dev/null);' - PS1=$PS1'if ! test "x${KUBECTL_CONTEXT}/${KUBECTL_NAMESPACE}" = "x";' + PS1=$PS1'if ! test "x${KUBECTL_CONTEXT}/${KUBECTL_NAMESPACE}" = "x/";' PS1=$PS1'then' PS1=$PS1' echo -e "'${BIRed}'[k8s:'${BIBlue} PS1=$PS1'${KUBECTL_CONTEXT}/${KUBECTL_NAMESPACE}'${BIRed}'] ";' diff --git a/.config/nix/dev.nix b/.config/nix/dev.nix index a8225ec..e5e50a4 100644 --- a/.config/nix/dev.nix +++ b/.config/nix/dev.nix @@ -76,7 +76,6 @@ pkgs.mkShell { pkgs.fortune pkgs.gh pkgs.src-cli # sourcegraph - # pkgs.vagrant # unfree and not installable # Formatting for .nix files pkgs.nixfmt-rfc-style pkgs.nixpkgs-fmt @@ -90,14 +89,13 @@ pkgs.mkShell { unstablePkgs.neovim unstablePkgs.vimPlugins.lazy-nvim unstablePkgs.gopls + # unfree NIXPKGS_ALLOW_UNFREE=1 + pkgs.vagrant # unfree ]; # To find all the packages for FPATH # for i in $(ls -d /nix/store/*/share/zsh/site-functions | cut -d '-' -f 2 | sort | uniq); do echo "\${pkgs.$i} \\"; done shellHook = '' - # FIXME: have no idea, why it doesn't work without it. - # ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu' - export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_ # glibc has no nss library included and tries to look at the default path instead export LD_LIBRARY_PATH=${pkgs.sssd}/lib export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh @@ -127,9 +125,7 @@ pkgs.mkShell { GIT_COMPLETION_DIR=${pkgs.git}/share/git/contrib/completion export GIT_COMPLETION_DIR - # TODO: automatically source zsh plugins # TODO: automatically source MANPATH - # TODO: automatically source bash and zsh completions BWRAPPED=1 bwrap \ --die-with-parent \ @@ -164,6 +160,7 @@ pkgs.mkShell { --bind-try /home/$(whoami)/.config/i3status /home/$(whoami)/.config/i3status \ --bind-try /home/$(whoami)/.config/nix /home/$(whoami)/.config/nix \ --bind-try /home/$(whoami)/.config/nvim /home/$(whoami)/.config/nvim \ + --bind-try /home/$(whoami)/.config/github-copilot /home/$(whoami)/.config/github-copilot \ --bind-try /home/$(whoami)/.config/systemd /home/$(whoami)/.config/systemd \ --bind-try /home/$(whoami)/.config/pulse /home/$(whoami)/.config/pulse \ --bind-try /home/$(whoami)/.config/pycodestyle /home/$(whoami)/.config/pycodestyle \ diff --git a/.zshrc b/.zshrc index f0d45ad..65df6db 100644 --- a/.zshrc +++ b/.zshrc @@ -1,6 +1,10 @@ -# To allow some scripts to determine which shell they're running in -ZSH_VERSION=$(zsh --version) -export ZSH_VERSION +# vim: ft=sh +# Idempotent configs + +NIXPKGS_ALLOW_UNFREE=1 +export NIXPKGS_ALLOW_UNFREE + +# Everything else autoload -Uz compinit compinit