mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 19:45:25 +03:00
guix: add .no-guix for foreign distros
This commit is contained in:
parent
b491314915
commit
4bd6d4d911
3 changed files with 28 additions and 11 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
"openresolv"
|
"openresolv"
|
||||||
"openvpn-update-resolve-conf"
|
"openvpn-update-resolve-conf"
|
||||||
"openvpn"
|
"openvpn"
|
||||||
|
"nss-certs"
|
||||||
"vnstat"
|
"vnstat"
|
||||||
"torsocks"
|
"torsocks"
|
||||||
"tor-client"
|
"tor-client"
|
||||||
|
|
|
||||||
19
.profile
19
.profile
|
|
@ -22,6 +22,14 @@ fi
|
||||||
# TZ='Asia/Karachi'; export TZ
|
# TZ='Asia/Karachi'; export TZ
|
||||||
# Environment:5 ends here
|
# Environment:5 ends here
|
||||||
|
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# [[file:Console.org::*Environment][Environment:6]]
|
||||||
|
if [ -f "/home/pavel/.no-guix" ]; then
|
||||||
|
export NO_GUIX=true
|
||||||
|
export PATH=$(echo $PATH | tr ":" "\n" | grep -vE "guix|nix|gnu" | tr "\n" ":")
|
||||||
|
fi
|
||||||
|
# Environment:6 ends here
|
||||||
|
|
||||||
# [[file:Console.org::*My paths][My paths:1]]
|
# [[file:Console.org::*My paths][My paths:1]]
|
||||||
if [ -d "$HOME/bin" ] ; then
|
if [ -d "$HOME/bin" ] ; then
|
||||||
export PATH="$HOME/bin:$PATH"
|
export PATH="$HOME/bin:$PATH"
|
||||||
|
|
@ -33,7 +41,6 @@ if [ -d "$HOME/.local/bin" ] ; then
|
||||||
fi
|
fi
|
||||||
# My paths:1 ends here
|
# My paths:1 ends here
|
||||||
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
# [[file:Console.org::*SSL Certs][SSL Certs:1]]
|
# [[file:Console.org::*SSL Certs][SSL Certs:1]]
|
||||||
export SSL_CERT_DIR="$HOME/.guix-extra-profiles/system/system/etc/ssl/certs/"
|
export SSL_CERT_DIR="$HOME/.guix-extra-profiles/system/system/etc/ssl/certs/"
|
||||||
export SSL_CERT_FILE="$HOME/.guix-extra-profiles/system/system/etc/ssl/certs/ca-certificates.crt"
|
export SSL_CERT_FILE="$HOME/.guix-extra-profiles/system/system/etc/ssl/certs/ca-certificates.crt"
|
||||||
|
|
@ -42,7 +49,7 @@ export CURL_CA_BUNDLE="$SSL_CERT_FILE"
|
||||||
# SSL Certs:1 ends here
|
# SSL Certs:1 ends here
|
||||||
|
|
||||||
# [[file:Console.org::*Guix settings][Guix settings:1]]
|
# [[file:Console.org::*Guix settings][Guix settings:1]]
|
||||||
if [ -z "$IS_ANDROID" ]; then
|
if [ -z "$IS_ANDROID" ] && [ -z "$NO_GUIX" ] ; then
|
||||||
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
|
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
|
||||||
for i in $GUIX_EXTRA_PROFILES/*; do
|
for i in $GUIX_EXTRA_PROFILES/*; do
|
||||||
profile=$i/$(basename "$i")
|
profile=$i/$(basename "$i")
|
||||||
|
|
@ -88,21 +95,21 @@ fi
|
||||||
# Other package managers:2 ends here
|
# Other package managers:2 ends here
|
||||||
|
|
||||||
# [[file:Console.org::*Other package managers][Other package managers:3]]
|
# [[file:Console.org::*Other package managers][Other package managers:3]]
|
||||||
if [ -f /run/current-system/profile/etc/profile.d/nix.sh ]; then
|
if [ -f /run/current-system/profile/etc/profile.d/nix.sh ] && [ -z "$NO_GUIX" ] ; then
|
||||||
. /run/current-system/profile/etc/profile.d/nix.sh
|
. /run/current-system/profile/etc/profile.d/nix.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e /home/pavel/.nix-profile/etc/profile.d/nix.sh ]; then . /home/pavel/.nix-profile/etc/profile.d/nix.sh; fi
|
if [ -e /home/pavel/.nix-profile/etc/profile.d/nix.sh ] && [ -z "$NO_GUIX" ] ; then . /home/pavel/.nix-profile/etc/profile.d/nix.sh; fi
|
||||||
# Other package managers:3 ends here
|
# Other package managers:3 ends here
|
||||||
|
|
||||||
# [[file:Console.org::*Other package managers][Other package managers:4]]
|
# [[file:Console.org::*Other package managers][Other package managers:4]]
|
||||||
if [ -d "$HOME/.guix-extra-profiles/desktop-misc" ]; then
|
if [ -d "$HOME/.guix-extra-profiles/desktop-misc" ] && [ -z "$NO_GUIX" ] ; then
|
||||||
export FONTCONFIG_PATH="$HOME/.guix-extra-profiles/desktop-misc/desktop-misc/etc/fonts"
|
export FONTCONFIG_PATH="$HOME/.guix-extra-profiles/desktop-misc/desktop-misc/etc/fonts"
|
||||||
fi
|
fi
|
||||||
# Other package managers:4 ends here
|
# Other package managers:4 ends here
|
||||||
|
|
||||||
# [[file:Console.org::*Other package managers][Other package managers:5]]
|
# [[file:Console.org::*Other package managers][Other package managers:5]]
|
||||||
if [ -d "$HOME/.nix-profile" ]; then
|
if [ -d "$HOME/.nix-profile" ] && [ -z "$NO_GUIX" ]; then
|
||||||
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.nix-profile/share/applications"
|
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.nix-profile/share/applications"
|
||||||
fi
|
fi
|
||||||
# Other package managers:5 ends here
|
# Other package managers:5 ends here
|
||||||
|
|
|
||||||
19
Console.org
19
Console.org
|
|
@ -71,6 +71,15 @@ Timezone
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
# TZ='Asia/Karachi'; export TZ
|
# TZ='Asia/Karachi'; export TZ
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Turn off Guix
|
||||||
|
#+begin_src bash
|
||||||
|
if [ -f "/home/pavel/.no-guix" ]; then
|
||||||
|
export NO_GUIX=true
|
||||||
|
export PATH=$(echo $PATH | tr ":" "\n" | grep -vE "guix|nix|gnu" | tr "\n" ":")
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** My paths
|
** My paths
|
||||||
My script folders
|
My script folders
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
|
|
@ -96,7 +105,7 @@ export CURL_CA_BUNDLE="$SSL_CERT_FILE"
|
||||||
Enable extra profiles
|
Enable extra profiles
|
||||||
|
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
if [ -z "$IS_ANDROID" ]; then
|
if [ -z "$IS_ANDROID" ] && [ -z "$NO_GUIX" ] ; then
|
||||||
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
|
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
|
||||||
for i in $GUIX_EXTRA_PROFILES/*; do
|
for i in $GUIX_EXTRA_PROFILES/*; do
|
||||||
profile=$i/$(basename "$i")
|
profile=$i/$(basename "$i")
|
||||||
|
|
@ -151,25 +160,25 @@ fi
|
||||||
|
|
||||||
Enable Nix
|
Enable Nix
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
if [ -f /run/current-system/profile/etc/profile.d/nix.sh ]; then
|
if [ -f /run/current-system/profile/etc/profile.d/nix.sh ] && [ -z "$NO_GUIX" ] ; then
|
||||||
. /run/current-system/profile/etc/profile.d/nix.sh
|
. /run/current-system/profile/etc/profile.d/nix.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e /home/pavel/.nix-profile/etc/profile.d/nix.sh ]; then . /home/pavel/.nix-profile/etc/profile.d/nix.sh; fi
|
if [ -e /home/pavel/.nix-profile/etc/profile.d/nix.sh ] && [ -z "$NO_GUIX" ] ; then . /home/pavel/.nix-profile/etc/profile.d/nix.sh; fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
|
|
||||||
Use Guix fontconfig. Necessary for nix apps
|
Use Guix fontconfig. Necessary for nix apps
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
if [ -d "$HOME/.guix-extra-profiles/desktop-misc" ]; then
|
if [ -d "$HOME/.guix-extra-profiles/desktop-misc" ] && [ -z "$NO_GUIX" ] ; then
|
||||||
export FONTCONFIG_PATH="$HOME/.guix-extra-profiles/desktop-misc/desktop-misc/etc/fonts"
|
export FONTCONFIG_PATH="$HOME/.guix-extra-profiles/desktop-misc/desktop-misc/etc/fonts"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Make nix apps visible to launchers:
|
Make nix apps visible to launchers:
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
if [ -d "$HOME/.nix-profile" ]; then
|
if [ -d "$HOME/.nix-profile" ] && [ -z "$NO_GUIX" ]; then
|
||||||
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.nix-profile/share/applications"
|
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.nix-profile/share/applications"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue