No description
Find a file
eymeric 5a00ba2912
Some checks failed
Nix / build (push) Failing after 30s
Revise README and add services.kvmd options
2025-11-30 19:34:33 +01:00
.github/workflows Run nix flake check for all systems in CI 2025-08-10 21:41:41 +02:00
modules fix: janus socket path 2025-11-28 14:21:41 +01:00
packages Add systemd tmpfiles and patch janus.js 2025-11-26 21:11:12 +01:00
.gitignore Ignore kvmd and tidy nginx extraGroups formatting 2025-11-21 11:10:13 +01:00
flake.lock chore: go back to nixos-unstable 2025-11-28 12:28:04 +01:00
flake.nix chore: go back to nixos-unstable 2025-11-28 12:28:04 +01:00
LICENSE Add GPL-3.0 license and comprehensive README 2025-06-11 21:35:31 +02:00
main.yml Add main configuration file and update note for kvmd setup 2025-07-08 20:56:40 +02:00
note.md Remove argparse path validators in kvmd 2025-11-21 13:56:36 +01:00
README.md Revise README and add services.kvmd options 2025-11-30 19:34:33 +01:00
todo Remove argparse path validators in kvmd 2025-11-21 13:56:36 +01:00

🖥️ NixOS PiKVM 🥧

NixOS PiKVM

🚀 Transform your NixOS system into a powerful KVM-over-IP solution! 🌟

What is this?

This project brings the awesome PiKVM experience to NixOS through a clean, declarative configuration! 🎉

Whats Working

  • Video streaming
    • Direct H264 (need https enabled)
    • Legacy MJPEG
  • Remote control (mouse + keyboard)
  • Virtual drive
  • Gpio control (Used for ATX control)
  • Nix declarative configuration

Whats not Working

  • VIdeo streaming webRTC h264

How to Install (Raspberry Pi Example)

This section outlines a typical installation workflow for NixOS PiKVM on a Raspberry Pi, inspired by a real-world home lab setup.

Prepare Your Configuration

Create a NixOS configuration for your Raspberry Pi.

{
  imports = [
    inputs.pikvm.nixosModules.default
  ];

  services.kvmd = {
    enable = true;
    package = inputs.pikvm.packages.aarch64-linux.default;
    hardwareVersion = "v2-hdmi-rpi4";
  };

  # ...other options (see linked config for details)
}

Generate the SD Card Image

Use nixos-generators to build an SD image:

nix run nixpkgs#nixos-generators -- -f sd-aarch64 --flake .#<machine> --system aarch64-linux -o ./<machine>-sd-aarch64

Replace <machine> with your hostname or flake target.

Flash the Image

Flash the generated image to your SD card using a tool like Caligula or dd.

Partitioning

After flashing, add two ext4 partitions to your SD card:

  • PIMSD: Used for virtual USB (make it large enough for your ISOs)
  • PIPST: Used for PiKVM persistent storage

You can use gparted or fdisk for partitioning.

Boot & Test

Insert the SD card, boot your Raspberry Pi, and cross your fingers!

available options :

In services.kvmd :

Option Type Description Example Value
enable boolean Enable the kvmd service true
package package The kvmd package to use inputs.pikvm.packages.aarch64-linux.default
hardwareVersion string PiKVM hardware version "v2-hdmi-rpi4"
configFile path Path to custom kvmd config file "/etc/kvmd/kvmd.yaml"
extraConfig attrs Extra kvmd configuration options { ... }
user string Username for PiKVM web UI "admin"
passwordFile path Path to password file for web UI "/etc/kvmd/password"
openFirewall boolean Open firewall ports for kvmd true
gpio.enable boolean Enable GPIO controls true
virtualDrive.enable boolean Enable virtual USB drive true
video.enable boolean Enable video streaming true
web.enable boolean Enable PiKVM web interface true
extraArgs list Extra command-line arguments for kvmd [ "--debug" ]
nginx.enable boolean Enable nginx web server for PiKVM true
nginx.httpPort port HTTP port for nginx 80
nginx.httpsPort port HTTPS port for nginx 443
nginx.httpsEnabled boolean Enable HTTPS support true

Contributing

I love contributions! 💝 Dont hesitate to open issues or pull requests for bugs, features, or improvements.

  • 🥧 PiKVM - The original PiKVM project
  • ❄️ nixpkgs - The Nix packages collection
  • 🖥️ nixos-hardware - Community-maintained hardware configuration collection for NixOS

License

This project is licensed under the GPL-3.0+ License - see the original PiKVM license for details.


Made with ❤️ for the NixOS and PiKVM communities