https://github.com/mayniklas/nixos-proxmox
https://github.com/mayniklas/nixos-proxmox
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mayniklas/nixos-proxmox
- Owner: MayNiklas
- Created: 2023-06-17T08:11:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T08:22:56.000Z (over 2 years ago)
- Last Synced: 2025-02-09T10:09:38.737Z (over 1 year ago)
- Language: Nix
- Size: 20.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NixOS on Proxmox
I created this repository to quickly deploy a minimal NixOS VM on Proxmox.
Feel free to fork it and adapt it to your needs.
The image can be build locally, or by using the included GitHub action.
## Deployment
### Build the image
```sh
# build VMA image
nix build '.#proxmox-image'
```
### Upload the image to Proxmox
Upload the image to a location, that is accessible by Proxmox.
### Create a VM on Proxmox
```sh
# import the VM from VMA image
# unique is required to randomize the MAC address of the network interface
# storage is the name of the storage, where we create the VM
qmrestore ./vzdump-qemu-nixos-*.vma.zst 999 --unique true --storage ZFS_mirror
```
### Change the VM settings
It makes sense to expand the disk size of the VM.
### Boot the VM
Welcome to NixOS!
### Apply config changes
1. Clone this repository
2. Apply your changes to the configuration
3. Execute `nixos-rebuild switch --flake .#proxmox-host`
## TODO
- [ ] Script should expand the disk size of the VM
- [ ] Add documentation