https://github.com/jesalx/nixos-config
My personal NixOS and home-manager configuration files
https://github.com/jesalx/nixos-config
config home-manager-config linux linux-dotfiles nix nixos nixos-config nixos-configuration nixos-dotfiles
Last synced: 7 months ago
JSON representation
My personal NixOS and home-manager configuration files
- Host: GitHub
- URL: https://github.com/jesalx/nixos-config
- Owner: Jesalx
- License: agpl-3.0
- Created: 2024-08-05T18:59:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-09T16:15:39.000Z (over 1 year ago)
- Last Synced: 2025-02-09T17:25:15.612Z (over 1 year ago)
- Topics: config, home-manager-config, linux, linux-dotfiles, nix, nixos, nixos-config, nixos-configuration, nixos-dotfiles
- Language: Nix
- Homepage:
- Size: 6.96 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NixOS Configuration
This repository contains my personal Nix configurations for:
- Personal x86 desktop running NixOS
- Personal Apple Silicon MacBook using Home Manager
- Work Apple Silicon MacBook using Home Manager
## Installation
### NixOS
To install on a NixOS system:
```bash
git clone git@github.com:Jesalx/nixos-config.git ~/nixos-config
cd ~/nixos-config
sudo nixos-rebuild switch --flake .#default
```
### macOS
For macOS systems, first install the Nix package manager. You have two options:
1. [Official Nix installer](https://nixos.org/download/#download-nixos)
2. [Determinate Systems Nix installer](https://github.com/DeterminateSystems/nix-installer) (Recommended)
Using the Determinate Systems installer should eliminate the need for extra experimental features flags in the following commands.
Next, [install Home Manager](https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone):
```bash
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
```
After installing Nix and Home Manager, set up the configuration:
```bash
git clone git@github.com:Jesalx/nixos-config.git ~/nixos-config
cd ~/nixos-config
home-manager switch -b backup --flake .#PROFILE --extra-experimental-features nix-command --extra-experimental-features flakes
```
Replace `PROFILE` with the appropriate profile name for the device.
## Next Steps
### SSH Keys
If you haven't already, then you should generate an SSH key pair.
```bash
ssh-keygen -t ed25519 -C "mail@jesal.dev"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
```
## Useful Commands
For convenience, several custom commands that wrap the regular nix commands are available to help manage your Nix environment:
| Command | Description |
| ----------- | ----------------------------------------------------------------------------------------------------- |
| `jp-test` | Tests the current configuration without making retaining changes on reboot. |
| `jp-switch` | Builds and activates the current configuration, making it the new default at boot. |
| `jp-update` | Update the flake and apply changes (equivalent to running `nix flake update` followed by `jp-switch`) |
| `jp-clean` | Cleans up old generations of your nix/home-manager profiles and optimizes the Nix store. |