https://github.com/suasuasuasuasua/nixos-config
My NixOS configuration
https://github.com/suasuasuasuasua/nixos-config
disko flakes home-manager nix-darwin nixos nixos-configuration
Last synced: 5 months ago
JSON representation
My NixOS configuration
- Host: GitHub
- URL: https://github.com/suasuasuasuasua/nixos-config
- Owner: suasuasuasuasua
- Created: 2024-09-03T22:36:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-08T02:35:03.000Z (5 months ago)
- Last Synced: 2026-03-08T04:07:44.392Z (5 months ago)
- Topics: disko, flakes, home-manager, nix-darwin, nixos, nixos-configuration
- Language: Nix
- Homepage:
- Size: 2.64 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NixOS Config
## Hosts
- NixOS
- [`lab`](./configurations/nixos/lab/README.md) (custom build)
- [`pi`](./configurations/nixos/pi/README.md) (Raspberry Pi Model 4B *(2GB RAM)*)
- Darwin
- [`mbp3`](./configurations/darwin/mbp3/README.md) (MacBook Pro M3 Max)
- Generic Linux
- [`penguin`](./configurations/home/penguin/README.md) (Acer 713-3W Chromebook)
## Setup
### NixOS
The initial setup is pretty simple now thanks to `disko`.
1. Boot the [minimal disk ISO](https://nixos.org/download/) onto a computer
1. Connect to the Internet
```bash
# Enter sudo mode
sudo -i
# Start the service
systemctl start wpa_supplicant.service
# Use the CLI to connect
wpa_cli
> add_network 0
> set_network 0 ssid ""
> set_network 0 psk ""
> enable_network 0
nix-shell -p disko
```
1. Run the `disko` utility
```bash
# Add the program to the path
nix-shell -p disko
CONFIG_PATH="github:suasuasuasuasua/nixos-config" # or you could clone locally first
NAME="penguin" # for example
disko --mode disko --flake "${CONFIG_PATH}"#"${NAME}"
nixos-install --no-channel-copy --no-root-password --flake "${CONFIG_PATH}"#"${NAME}"
```
1. Prepare the passwords and ZFS pools
```bash
# Set your password
nixos-enter --root /mnt -c "passwd ${USERNAME}"
# Export the zpools so that they can be used by the actual computer (not the
# installer!)
zpool export -a
# Reboot to your new system!
reboot
```
1. Initialize Samba (`smb`) (as root)
```bash
# Add a user and a password
smbpasswd -a ${USERNAME}
smbpasswd -e ${USERNAME}
# Make the zshare owned by samba and writable
chgrp -R samba /zshare
chmod -R 775 /zshare
```
1. Make changes and rebuild the system
```bash
# Rebuild the system after any changes!
just switch
```
### Darwin
The setup for `darwin` machines is much simpler. Make sure to connect to the
internet before beginning.
> See the [website](https://docs.determinate.systems) for an updated guide on
> Darwin
1. Install `nix` on the machine. You may be prompted to install developer tools
(like `git`, `xcode`, etc.), so make sure to accept and be patient.
```bash
curl -fsSL https://install.determinate.systems/nix | sh -s -- install
```
1. Install `nix-darwin`
```bash
# To use Nixpkgs 25.05:
sudo nix run nix-darwin/nix-darwin-25.05#darwin-rebuild -- switch --flake .
```
1. Install the configuration from GitHub
```bash
# switch to the mbp3 device for example
darwin-rebuild switch --flake github:suasuasuasuasua/nixos-config#mbp3
```
### Generic Linux
The setup for other Linux machines is much simpler. Make sure to connect to the
internet before beginning.
1. Install `nix` on the machine
```bash
curl -fsSL https://install.determinate.systems/nix | sh -s -- install
```
1. Install `home-manager` and switch configurations
```bash
nix run home-manager -- switch --flake .#penguin
```