flake/README.md

60 lines
1.3 KiB
Markdown
Raw Normal View History

2023-09-19 00:17:43 +00:00
# nix{os,-darwin} config
2023-10-31 09:19:51 +00:00
2023-12-29 15:34:58 +00:00
It just works™
2023-10-31 09:19:51 +00:00
## Structure
2023-12-29 15:34:58 +00:00
2024-02-07 01:37:17 +00:00
Any directory or file that is prefixed with an `_` (underscore) means that the
whole directory/file is unused in this repository.
2023-10-31 09:19:51 +00:00
```
 .
2024-02-07 01:37:17 +00:00
│ # Darwin configuration is not actively maintained and sometimes it might
│ # break.
├── 󱂵 home
2023-11-17 05:38:25 +00:00
├──  darwin
2023-10-31 09:19:51 +00:00
├──  nixos
2023-11-17 05:38:25 +00:00
│ ├──  modules
│ └──  profiles
2024-02-07 01:37:17 +00:00
├──  hosts
2023-10-31 09:19:51 +00:00
├──  flake.nix
├──  flake.lock
└──  README.md
```
2023-12-29 15:34:58 +00:00
2023-10-31 09:19:51 +00:00
## Installation:
2023-12-29 15:34:58 +00:00
Please don't.
### NixOS:
1. Clone this repository
`$ git clone https://github.com/Guanran928/flake.git`
2023-10-31 09:19:51 +00:00
2024-02-07 01:37:17 +00:00
2. Add your device's hardware configuration in `./flake.nix` and
`./hosts/<hostname>`
2023-10-31 09:19:51 +00:00
2023-12-29 15:34:58 +00:00
3. Install NixOS
2023-10-31 09:19:51 +00:00
2023-12-29 15:34:58 +00:00
`$ nixos-install --flake <this flake's directory>#<hostname>`
### macOS:
1. Install Nix using [`Determinate Nix Installer`](https://github.com/DeterminateSystems/nix-installer)
`$ curl --proto '=https' --tlsv1.2 -fsSL https://install.determinate.systems/nix | sh -s -- install`
2. Clone this repository
`$ git clone https://github.com/Guanran928/flake.git`
3. Add your device's hardware configuration in `./flake.nix` and
`./hosts/<hostname>`
4. Install [`nix-darwin`](https://github.com/LnL7/nix-darwin?tab=readme-ov-file#flakes)
`nix run nix-darwin -- switch --flake <this flake's directory>#<hostname>`