chore(macos): remove config files for macOS (I stopped using it)
This commit is contained in:
parent
7e48596814
commit
bd7556a682
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,8 +1,5 @@
|
|||||||
# OS
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# IDEs
|
# IDEs
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# Ignore private configurations
|
# Ignore private configurations
|
||||||
ssh-config.nix
|
private/ssh-config.nix
|
40
Brewfile
40
Brewfile
@ -1,40 +0,0 @@
|
|||||||
tap "homebrew/bundle"
|
|
||||||
brew "webp"
|
|
||||||
brew "awscli"
|
|
||||||
brew "libpq"
|
|
||||||
brew "ncdu"
|
|
||||||
brew "nvm"
|
|
||||||
brew "tree"
|
|
||||||
cask "1password"
|
|
||||||
cask "alfred"
|
|
||||||
cask "divvy"
|
|
||||||
cask "docker"
|
|
||||||
cask "google-chrome"
|
|
||||||
cask "google-drive"
|
|
||||||
cask "hiddenbar"
|
|
||||||
cask "kap"
|
|
||||||
cask "obs"
|
|
||||||
cask "slack"
|
|
||||||
cask "steam"
|
|
||||||
cask "telegram"
|
|
||||||
cask "transmission"
|
|
||||||
cask "visual-studio-code"
|
|
||||||
cask "vlc"
|
|
||||||
cask "warp"
|
|
||||||
cask "webstorm"
|
|
||||||
cask "whatsapp"
|
|
||||||
vscode "Angular.ng-template"
|
|
||||||
vscode "bradlc.vscode-tailwindcss"
|
|
||||||
vscode "cweijan.vscode-mysql-client2"
|
|
||||||
vscode "esbenp.prettier-vscode"
|
|
||||||
vscode "GitHub.copilot"
|
|
||||||
vscode "mikestead.dotenv"
|
|
||||||
vscode "ms-vscode.cpptools"
|
|
||||||
vscode "nrwl.angular-console"
|
|
||||||
vscode "platformio.platformio-ide"
|
|
||||||
vscode "Postman.postman-for-vscode"
|
|
||||||
vscode "Prisma.prisma"
|
|
||||||
vscode "svelte.svelte-vscode"
|
|
||||||
vscode "syler.sass-indented"
|
|
||||||
vscode "vscode-icons-team.vscode-icons"
|
|
||||||
vscode "xaver.clang-format"
|
|
24
README.md
24
README.md
@ -1,22 +1,20 @@
|
|||||||
# Dotfiles
|
# Dotfiles
|
||||||
|
|
||||||
In this repo I store my config files.
|
In this repo I store my config files.
|
||||||
- `Brewfile` for macOS (I'm about to drop it).
|
|
||||||
- `configuration.nix` for NixOS (a new linux distro for me, that I'm exploring as a replacement for macOS).
|
|
||||||
It helps me to install quickly all software I need for work and fun.
|
It helps me to install quickly all software I need for work and fun.
|
||||||
Feel free to check & alter the list of software to be installed in these files.
|
Feel free to check & alter the list of software to be installed in these files.
|
||||||
|
|
||||||
## Installation
|
I use NixOS. It stores all of it's configuration in `configuration.nix`.
|
||||||
|
That's where you can start exploration and modification.
|
||||||
|
|
||||||
### macOS/Brew
|
## Install
|
||||||
1. Install Brew from here: https://brew.sh/
|
|
||||||
2. Copy Brewfile to your computer and run `brew bundle` from the same folder where you copied the file.
|
|
||||||
3. Run `chmod +x ./cron-adjust-microphone-gain-to-100.sh` and `./cron-adjust-microphone-gain-to-100.sh` [to change microphone gain to 100% on macOS](https://apple.stackexchange.com/questions/97810/mac-osx-microphone-input-volume-level-auto-adjusts-can-it-be-disabled).
|
|
||||||
|
|
||||||
Note: Brew will ask you for the root password and other apps inside Brewfile might ask you for your password as well.
|
1. Clone this repo.
|
||||||
Usually installation takes 10-20 min, so make sure to brew a cup of tea or coffee :)
|
2. Give build script permission to execute: `chmod +x ./build-nix.sh`.
|
||||||
|
|
||||||
### NixOS
|
|
||||||
1. `chmod +x ./build-nix.sh`
|
|
||||||
2. [Optionally] SSH Config `cp ./ssh-config.nix.example ./ssh-config.nix` and fill with your values.
|
2. [Optionally] SSH Config `cp ./ssh-config.nix.example ./ssh-config.nix` and fill with your values.
|
||||||
3. [First run] `./build-nix.sh` or [then] just `make`
|
3. Apply configuration with `make`.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Change configuration files to desired state.
|
||||||
|
2. Apply configuration with `make`.
|
@ -10,10 +10,6 @@ echo "Checking for sudo access..."
|
|||||||
# Ensure the script is being run with superuser privileges
|
# Ensure the script is being run with superuser privileges
|
||||||
sudo -v
|
sudo -v
|
||||||
|
|
||||||
echo "Backing up current configuration..."
|
|
||||||
# Create a backup of the current configuration file with a timestamp
|
|
||||||
sudo cp "${NIXOS_CONFIG_PATH}/configuration.nix" "${NIXOS_CONFIG_PATH}/configuration.nix-backup-$(date +%F-%H-%M-%S)"
|
|
||||||
|
|
||||||
echo "Copying new configuration..."
|
echo "Copying new configuration..."
|
||||||
# Copy the local configuration.nix to the system configuration location
|
# Copy the local configuration.nix to the system configuration location
|
||||||
sudo cp ./*.nix "${NIXOS_CONFIG_PATH}"
|
sudo cp ./*.nix "${NIXOS_CONFIG_PATH}"
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# If the microphone gain is less than 100, increase it by 3 every 0.1 seconds until it reaches 100
|
|
||||||
CRON_JOB="* * * * * while (( \$(osascript -e \"input volume of (get volume settings)\") < 100 )); do osascript -e \"set volume input volume (input volume of (get volume settings) + 3)\"; sleep 0.1; done;"
|
|
||||||
|
|
||||||
# Escape percent signs for cron
|
|
||||||
ESCAPED_CRON_JOB=$(echo "${CRON_JOB}" | sed 's/%/\\%/g')
|
|
||||||
|
|
||||||
# Backup current crontab (just in case)
|
|
||||||
CRONTAB_BACKUP=$(crontab -l)
|
|
||||||
|
|
||||||
# Check if the cron job already exists
|
|
||||||
if echo "${CRONTAB_BACKUP}" | grep -F -- "${CRON_JOB}" > /dev/null 2>&1; then
|
|
||||||
echo "Cron job already exists. Not adding again."
|
|
||||||
else
|
|
||||||
# Add the cron job to the crontab
|
|
||||||
(echo "${CRONTAB_BACKUP}"; echo "${ESCAPED_CRON_JOB}") | crontab -
|
|
||||||
echo "Cron job added."
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user