chore: Add Rocm related workaround and decrypt_folder function

This commit is contained in:
Menno van Leeuwen 2024-08-30 16:53:03 +02:00
parent 93809054f6
commit 821b8168fa
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE
7 changed files with 172 additions and 16 deletions

4
.zshrc
View File

@ -103,6 +103,10 @@ export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Rocm related workaround
export HSA_OVERRIDE_GFX_VERSION=11.0.0
#####################
# End of the line...#
#####################

View File

@ -80,20 +80,27 @@ encrypt_folder() {
done
}
# Recursively decrypt all .gpg files under the folder specified, recursively call this function for sub folders!
# Keep the original file name minus the .gpg extension
decrypt_folder() {
for file in $1/*; do
# Skip if current file is a .gpg file
if [[ $file == *.gpg ]]; then
filename=$(basename $file .gpg)
printfe "%s\n" "cyan" "Decrypting $file..."
gpg --quiet --batch --yes --decrypt --passphrase="$password" --output $1/$filename $file
fi
# Do the same for files under $HOME/dotfiles/secrets/ (These can be any file type, not just .conf so keep the extension)
if [[ "$2" == "decrypt" ]]; then
printfe "%s\n" "cyan" "Decrypting secrets..."
echo -en '\r'
for file in $HOME/dotfiles/secrets/*.gpg; do
filename=$(basename $file .gpg)
gpg --quiet --batch --yes --decrypt --passphrase="$password" --output $HOME/dotfiles/secrets/$filename $file
# If file is actually a folder, call this function recursively
if [[ -d $file ]]; then
printfe "%s\n" "cyan" "Decrypting folder $file..."
decrypt_folder $file
fi
done
elif [[ "$2" == "encrypt" ]]; then
printfe "%s\n" "cyan" "Encrypting secrets..."
echo -en '\r'
}
encrypt_folder $HOME/dotfiles/secrets
fi
if [[ "$2" == "decrypt" ]]; then
decrypt_folder ~/dotfiles/secrets
elif [[ "$2" == "encrypt" ]]; then
encrypt_folder ~/dotfiles/secrets
fi

View File

@ -111,6 +111,11 @@ config:
url: git@github.com:vleeuwenmenno/songguru-bot.git
branch: develop
target: ~/Projects/Private/songguru-bot
ssdc_app_v2:
url: git@github.com:vleeuwenmenno/ssdc_app_v2.git
branch: master
target: ~/Projects/Private/ssdc_app_v2
# Packages to install
@ -176,8 +181,14 @@ config:
- libfreetype-dev
- mold
- cargo
- clang
- libgtk-3-dev
- gcc-mingw-w64
- btop
- htop
- libgbm-dev
- libclang-dev
- libsecret-1-dev
- libpipewire-0.3-dev
- libpam0g-dev
- openssh-server

122
config/ssh/sshd_config Normal file
View File

@ -0,0 +1,122 @@
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
Include /etc/ssh/sshd_config.d/*.conf
Port 400
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
PubkeyAuthentication yes
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin prohibit-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM yes
AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server

View File

@ -1,3 +1,3 @@
{
"enable-crash-reporter": true,
"enable-crash-reporter": false,
}

View File

@ -1 +1 @@
["aaron-bond.better-comments","bmewburn.vscode-intelephense-client","christian-kohler.path-intellisense","davidanson.vscode-markdownlint","esbenp.prettier-vscode","foxundermoon.shell-format","github.copilot","github.copilot-chat","github.vscode-pull-request-github","mguellsegarra.highlight-on-copy","ms-azuretools.vscode-docker","ms-vscode-remote.remote-containers","ms-vscode-remote.remote-ssh","ms-vscode-remote.remote-ssh-edit","ms-vscode.makefile-tools","ms-vscode.remote-explorer","ms-vsliveshare.vsliveshare","nicolasvuillamy.vscode-groovy-lint","usernamehw.errorlens","vincaslt.highlight-matching-tag","vscode-icons-team.vscode-icons","warpnet.salt-lint","xdebug.php-debug","xdebug.php-pack","yinfei.luahelper","zobo.php-intellisense"]
["aaron-bond.better-comments","alexisvt.flutter-snippets","bmewburn.vscode-intelephense-client","christian-kohler.path-intellisense","dart-code.dart-code","dart-code.flutter","davidanson.vscode-markdownlint","esbenp.prettier-vscode","foxundermoon.shell-format","github.copilot","github.copilot-chat","github.vscode-pull-request-github","mguellsegarra.highlight-on-copy","ms-azuretools.vscode-docker","ms-vscode-remote.remote-containers","ms-vscode-remote.remote-ssh","ms-vscode-remote.remote-ssh-edit","ms-vscode.makefile-tools","ms-vscode.remote-explorer","ms-vsliveshare.vsliveshare","nicolasvuillamy.vscode-groovy-lint","usernamehw.errorlens","vincaslt.highlight-matching-tag","vscode-icons-team.vscode-icons","warpnet.salt-lint","xdebug.php-debug","xdebug.php-pack","yinfei.luahelper","zobo.php-intellisense"]

View File

@ -18,4 +18,16 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.openRepositoryInParentFolders": "always",
"makefile.configureOnOpen": false,
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
140
],
"editor.selectionHighlight": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": "off"
},
}