A comprehensive guide to set up and manage your system configuration using Nix, Taskfile, and 1Password.
Run the following command to install Taskfile:
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
Ensure ~/.local/bin
is in your PATH
:
export PATH="$HOME/.local/bin:$PATH"
- Nix Package Manager
- 1Password CLI
git clone https://github.com/nklmilojevic/nix-config
task setup-nix
op signin
task build
: Build the configuration for your current system.task switch
: Apply the new configuration.task universal-build
: Build and apply configuration (combinesbuild
andswitch
).task update
: Update theflake.lock
file.task clean
: Clean build artifacts.task edit
: Open configuration files for editing.task status
: Show the current Nix-Darwin and Home Manager status.
task check-op-signin
: Verify 1Password CLI authentication.task all-secrets
: Generate all secret files.task generate-secrets
: Generate environment variables.task generate-ssh-config
: Generate SSH configuration.task generate-atuin-key
: Generate Atuin sync key.task generate-age-key
: Generate Age encryption key.task install-fonts
: Install private fonts from 1Password (macOS only).
Secrets are securely managed through 1Password CLI and are automatically fetched during setup.
- Uses nix-darwin for system configuration.
- Automatically configures system preferences.
- Manages Homebrew packages.
- Uses Home Manager for user environment.
- Configures user-specific packages and settings.
- Make changes to your configuration in
flake.nix
. - Build and switch to the new configuration:
task universal-build
After switching configurations, the system will automatically:
- Verify 1Password CLI authentication.
- Generate all necessary secret files.
- Install private fonts (macOS only).
- Update dependencies:
task update
- Clean build artifacts:
task clean
- Check configuration status:
task status
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This configuration is inspired by various Nix community members and configurations.