diff --git a/.gitignore b/.gitignore index 317688c..2515ef5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ -# OS -.DS_Store - # IDEs .idea/ # Ignore private configurations -ssh-config.nix \ No newline at end of file +private/ssh-config.nix \ No newline at end of file diff --git a/Brewfile b/Brewfile deleted file mode 100644 index fc00b42..0000000 --- a/Brewfile +++ /dev/null @@ -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" diff --git a/README.md b/README.md index 236c750..419421a 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,20 @@ # Dotfiles 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. -## 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 -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). +## Install -Note: Brew will ask you for the root password and other apps inside Brewfile might ask you for your password as well. -Usually installation takes 10-20 min, so make sure to brew a cup of tea or coffee :) - -### NixOS -1. `chmod +x ./build-nix.sh` +1. Clone this repo. +2. Give build script permission to execute: `chmod +x ./build-nix.sh`. 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` \ No newline at end of file +3. Apply configuration with `make`. + +## Usage + +1. Change configuration files to desired state. +2. Apply configuration with `make`. \ No newline at end of file diff --git a/build-nix.sh b/build-nix.sh index 34b945c..88930f9 100755 --- a/build-nix.sh +++ b/build-nix.sh @@ -10,10 +10,6 @@ echo "Checking for sudo access..." # Ensure the script is being run with superuser privileges 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..." # Copy the local configuration.nix to the system configuration location sudo cp ./*.nix "${NIXOS_CONFIG_PATH}" diff --git a/cron-adjust-microphone-gain-to-100.sh b/cron-adjust-microphone-gain-to-100.sh deleted file mode 100755 index 133f0a4..0000000 --- a/cron-adjust-microphone-gain-to-100.sh +++ /dev/null @@ -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