Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jklaiber/nixconfig
https://github.com/jklaiber/nixconfig
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jklaiber/nixconfig
- Owner: jklaiber
- Created: 2023-02-14T12:51:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T09:04:30.000Z (10 months ago)
- Last Synced: 2024-03-28T16:09:01.738Z (10 months ago)
- Language: Lua
- Size: 52.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NixConfig
This is my personal Nix configuration repository for macOS. It includes all the packages and configuration files I use on my system, managed by Nix, using a Nix Flake.> "Defining the whole configuration of a system in code is a revolutionary concept, and it's a really powerful one." - Jessica Kerr
## Requirements
- [Nix package manager](https://nixos.org/nix/)
- [Homebrew](https://brew.sh/)
- [Git](https://git-scm.com/)
- [Nix Flakes](https://nixos.wiki/wiki/Flakes)## Installation
1. Install nix
```bash
curl -L https://nixos.org/nix/install | shmkdir -p ~/.config/nix
cat < ~/.config/nix/nix.conf
experimental-features = nix-command flakes
EOF
```
2. Install homebrew
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
3. Download the repository
4. Restore the Nix configuration
```bash
nix build .#darwinConfigurations..system
./result/sw/bin/darwin-rebuild switch --flake .
```## Usage
- To install a new package, add it to the `home-manager/default.nix` or `home-manager/applications/` file and run `nix build .#darwinConfigurations.jumac.system` again.
- To update all packages, run `nix flake update && nix build .#darwinConfigurations.jumac.system`.
- To edit any configuration file, modify the corresponding file in the `home-manager/` or `darwin/` directory and run `darwin-rebuild switch --flake ~/nixconfig`.### Update
```bash
nix-channel --update
nix --extra-experimental-features "nix-command flakes" flake update
nix --extra-experimental-features "nix-command flakes" build .#darwinConfigurations.jumac.system --impure
darwin-rebuild switch --flake ~/nixconfig --show-trace --impure
```## Contributing
If you have any suggestions, improvements or bugfixes, feel free to open a pull request. I appreciate any help and feedback!