From 87c6d0fab4887c4616ef1262c99422e1ca23e7ff Mon Sep 17 00:00:00 2001 From: Haonan Chen Date: Fri, 2 Jan 2026 18:05:24 +0800 Subject: [PATCH] devices.wlin: install --- devices/wlin/default.nix | 3 +++ devices/wlin/files/.bash_profile | 6 ++--- devices/wlin/files/.bashrc | 36 ------------------------- devices/wlin/files/.config/nix/nix.conf | 2 ++ 4 files changed, 7 insertions(+), 40 deletions(-) create mode 100644 devices/wlin/files/.config/nix/nix.conf diff --git a/devices/wlin/default.nix b/devices/wlin/default.nix index bcc10c74..8809efc3 100644 --- a/devices/wlin/default.nix +++ b/devices/wlin/default.nix @@ -1,3 +1,6 @@ +# sudo nix build --store 'local?store=/data/gpfs01/wlin/.nix/store&state=/data/gpfs01/wlin/.nix/state&log=/data/gpfs01/wlin/.nix/log' .#wlin +# sudo nix-store --store 'local?store=/data/gpfs01/wlin/.nix/store&state=/data/gpfs01/wlin/.nix/state&log=/data/gpfs01/wlin/.nix/log' -qR ./result | grep -Fxv -f <(ssh wlin find .nix/store -maxdepth 1 -exec realpath '{}' '\;') | sudo xargs nix-store --store 'local?store=/data/gpfs01/wlin/.nix/store&state=/data/gpfs01/wlin/.nix/state&log=/data/gpfs01/wlin/.nix/log' --export | pv > wlin.nar +# cat wlin.nar | nix-store --import { inputs, localLib }: let pkgs = import inputs.nixpkgs (localLib.buildNixpkgsConfig diff --git a/devices/wlin/files/.bash_profile b/devices/wlin/files/.bash_profile index 3dc099a2..d0b1c77d 100644 --- a/devices/wlin/files/.bash_profile +++ b/devices/wlin/files/.bash_profile @@ -6,7 +6,5 @@ if [ -f ~/.bashrc ]; then fi # User specific environment and startup programs - -PATH=$PATH:$HOME/bin - -export PATH +export PATH=$PATH:$HOME/bin +ulimit -s unlimited diff --git a/devices/wlin/files/.bashrc b/devices/wlin/files/.bashrc index c19f52ce..a5a134f8 100644 --- a/devices/wlin/files/.bashrc +++ b/devices/wlin/files/.bashrc @@ -4,40 +4,4 @@ if [ -f /etc/bashrc ]; then . /etc/bashrc fi - -export PATH=$PATH:/data/gpfs01/wlin/bin - -# User specific aliases and functions -export PATH=/data/gpfs01/wlin/bin/vaspkit.1.4.1/bin:${PATH} -#export PATH=~/bin:/data/gpfs01/wlin/opt/mpich_ifort/bin:$PATH -#export LD_LIBRARY_PATH=/data/gpfs01/wlin/opt/mpich_ifort/lib:$LD_LIBRARY_PATH -#export PATH=~/bin:/data/gpfs01/wlin/opt/mpich/bin:$PATH -#export LD_LIBRARY_PATH=/data/gpfs01/wlin/opt/mpich/lib:$LD_LIBRARY_PATH -export P4_RSHCOMMAND=ssh - shopt -s cdspell - export HISTCONTROL=ignoredups -#shopt -s histappend - PROMPT_COMMAND='history -a' - export C3_RSH="ssh -x" -export OMP_NUM_THREADS=1 -export MKL_NUM_THREADS=1 -alias grep='grep --color' -USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'` - -export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S `whoami`@${USER_IP}: " export HISTFILESIZE=1000000 -export PROMPT_COMMAND="history -a; history -r; $PROMPT_COMMAND" -shopt -s histappend -# Auto add env parameter $PROMPT_COMMAND when use non-Linux tty login by ssh. -if [ "$SSH_CONNECTION" != '' -a "$TERM" != 'linux' ]; then -declare -a HOSTIP -HOSTIP=`echo $SSH_CONNECTION |awk '{print $3}'` -export PROMPT_COMMAND='echo -ne "\033]0;${USER}@$HOSTIP:[${HOSTNAME%%.*}]:${PWD/#$HOME/~} \007"' -fi -ulimit -s unlimited -export PYTHONPATH=/data/gpfs01/wlin/bin/VaspBandUnfolding-master:${PYTHONPATH} - -# vsts, see https://theory.cm.utexas.edu/vtsttools/scripts.html -export PATH=$PATH:/data/gpfs01/wlin/yjj/vtstscripts-1022 -export PERL5LIB=/data/gpfs01/wlin/yjj/vtstscripts-1022 - diff --git a/devices/wlin/files/.config/nix/nix.conf b/devices/wlin/files/.config/nix/nix.conf new file mode 100644 index 00000000..f5875f03 --- /dev/null +++ b/devices/wlin/files/.config/nix/nix.conf @@ -0,0 +1,2 @@ +store = local?store=/data/gpfs01/wlin/.nix/store&state=/data/gpfs01/wlin/.nix/state&log=/data/gpfs01/wlin/.nix/log +experimental-features = flakes nix-command