diff options
author | Alex Auvolat <alex@adnab.me> | 2023-09-10 12:50:33 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-09-10 12:50:33 +0200 |
commit | c0b9c8c54da7fdbe2bca5d6a637f530525f92834 (patch) | |
tree | b33952bb9bf256173a35a4d539315f0cc94dec9a | |
parent | d581b99f6c23a9bd21fc52027f4756abde295fbe (diff) | |
download | user-config-c0b9c8c54da7fdbe2bca5d6a637f530525f92834.tar.gz user-config-c0b9c8c54da7fdbe2bca5d6a637f530525f92834.zip |
fix home link making
-rw-r--r-- | nixpkgs/kusanagi.nix | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/nixpkgs/kusanagi.nix b/nixpkgs/kusanagi.nix index 1ce4be3..6f43dc9 100644 --- a/nixpkgs/kusanagi.nix +++ b/nixpkgs/kusanagi.nix @@ -9,17 +9,27 @@ in { imports = [ ./common.nix ]; programs.bash.profileExtra = '' - ln -sf /Z/lx/Downloads ~/Downloads + function mklink { + if [ ! -L "$2" ]; then + ln -sfv "$1" "$2" + fi + } - ln -sf /Z/lx/app/openssh ~/.ssh + mklink /Z/lx/Downloads ~/Downloads + + mklink /Z/lx/app/openssh ~/.ssh mkdir -p ~/.gnupg - ln -sf /Z/lx/app/gnupg/pubring.kbx ~/.gnupg/ - ln -sf /Z/lx/app/gnupg/trustdb.gpg ~/.gnupg/ - ln -sf /Z/lx/app/gnupg/private-keys-v1.d ~/.gnupg/ - ln -sf /Z/lx/app/cargo ~/.cargo + mklink /Z/lx/app/gnupg/pubring.kbx ~/.gnupg/pubring.kbx + mklink /Z/lx/app/gnupg/trustdb.gpg ~/.gnupg/trustdb.gpg + mklink /Z/lx/app/gnupg/private-keys-v1.d ~/.gnupg/private-keys-v1.d + mklink /Z/lx/app/cargo ~/.cargo + + mklink /Z/lx/app/arduino/Arduino ~/Arduino + mklink /Z/lx/app/arduino/.arduino15 ~/.arduino15 - ln -sf /Z/lx/app/arduino/Arduino ~/Arduino - ln -sf /Z/lx/app/arduino/.arduino15 ~/.arduino15 + mkdir -p ~/.local/share/Steam + mklink /Z/lx/app/steam/.steam ~/.steam + mklink /Z/lx/app/steam/Steam ~/.local/share/Steam ''; programs.bash.shellAliases.z = "cd /Z/lx"; |