How to Install Home Assistant on NixOS Latest

Home Assistant is an open-source home automation platform that allows you to control your smart home devices from a single user interface. In this tutorial, you will learn how to install Home Assistant on NixOS Latest operating system.

Prerequisites

Before we begin, make sure you have the following:

Step-by-step Installation Guide

Step 1: Install NixOS Latest:

If you have not already installed NixOS Latest, follow the guide on the official website to complete the installation process.

Step 2: Install Home Assistant:

  1. Open your terminal and run the following command to install Home Assistant:

    sudo nix-env -i home-assistant
    

    The command takes a few minutes to complete.

  2. After the installation is complete, start the Home Assistant service using the following command:

    sudo systemctl start home-assistant@root
    
  3. Verify that the Home Assistant service is running by using the following command:

    sudo systemctl status home-assistant@root
    

    If the service is running, you should see the following output:

    ● home-assistant@root.service - Home Assistant for root
         Loaded: loaded (/nix/store/.../nix-profiles/home-manager/home-assistant@.service; enabled; vendor preset: enabled)
         Active: active (running) since ...
    

    If the service is not running, try restarting it using the following command:

    sudo systemctl restart home-assistant@root
    

    You can also check the Home Assistant logs for any errors using the following command:

    sudo journalctl -u home-assistant@root
    

    If there are any issues, you should see errors in the logs.

Step 3. Configure Home Assistant:

  1. To configure Home Assistant, open your preferred browser and enter the IP address of your NixOS Latest system followed by ":8123" in the address bar.

    http://<nixOS_latest_system_IP_address>:8123/
    

    Replace <nixOS_latest_system_IP_address> with the IP address of your system.

  2. You should now see the Home Assistant web interface. Follow the prompts to set up your Home Assistant installation.

    Note: It may take a few minutes for the interface to load.

  3. Once you have completed the configuration steps, you can start adding your smart home devices to Home Assistant and control them from a single user interface.

Congratulations! You have successfully installed Home Assistant on NixOS Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!