90 lines
2 KiB
Markdown
90 lines
2 KiB
Markdown
# My nix conf
|
|
|
|
## 🏠 Home Setup
|
|
|
|
```bash
|
|
nix run home-manager/release-23.05 -- switch --flake .
|
|
```
|
|
|
|
## 🏗️ System Setup
|
|
|
|
### 👷 "Manual"
|
|
|
|
1. Boot Installer
|
|
2. Clone repo
|
|
3. Setup partitions
|
|
```bash
|
|
sudo nix run --extra-experimental-features flakes --extra-experimental-features nix-command github:nix-community/disko -- --mode disko --flake path:$PWD#nixos-pulse
|
|
```
|
|
4. Run installer
|
|
```bash
|
|
sudo nixos-install --flake .#nixos-pulse
|
|
```
|
|
|
|
### 🚀 Fully-Automated
|
|
|
|
<sub> 🚨 This will WIPE EVERYTHING on the specified system <br> ⚠️ ensure proper sshd & firewall key setup for remote systems </sub>
|
|
|
|
```bash
|
|
nix run github:numtide/nixos-anywhere -- --flake path:$PWD#nixos-pulse root@1.2.3.4
|
|
```
|
|
|
|
## 🔄 Updates
|
|
|
|
Run this to keep your system up-to-date.
|
|
|
|
```bash
|
|
nix flake update
|
|
sudo nixos-rebuild --flake .#nixos-pulse switch
|
|
```
|
|
|
|
Run this to keep your home up-to-date.
|
|
```bash
|
|
nix flake update
|
|
home-manager switch --flake .
|
|
```
|
|
|
|
|
|
## Plasma
|
|
|
|
Add GUI settings to plasma.nix
|
|
|
|
```bash
|
|
nix run github:pjones/plasma-manager | rg -v khotkeysrc | rg -v "\[ \]" > plasma.new.nix
|
|
diff plasma.nix plasma.new.nix
|
|
# copy over as needed
|
|
```
|
|
|
|
## 🛠️ Nix Configuration Structure
|
|
|
|
Here's a brief rundown of the directory structure:
|
|
|
|
### Top-Level Files
|
|
|
|
- `flake.nix`: Nix Flake configuration file.
|
|
|
|
#### `home-mods` Directory
|
|
|
|
Stores modules related to specific user applications or environments.
|
|
|
|
#### `os-mods` Directory
|
|
|
|
Holds system-level modules for network, virtualization, desktop etc.
|
|
|
|
#### `users` Directory
|
|
|
|
Holds home-manager configuration for the users listed in `users.nix`
|
|
|
|
#### `systems` Directory
|
|
|
|
Holds system specific nixos configuration (e.g. hardware quirks).
|
|
|
|
## 🙏 Made possible by
|
|
|
|
- NixOS: https://nixos.org/
|
|
- https://github.com/nix-community/nixos-anywhere
|
|
- https://github.com/nix-community/disko
|
|
- Countless great examples e.g.:
|
|
- https://github.com/etu/nixconfig
|
|
- https://github.com/hlissner/dotfiles
|
|
- Caffeine https://en.wikipedia.org/wiki/Caffeine
|