How to Install Mealie on NixOS Latest
Requirements:
Before we start with the installation process, make sure you have the following requirements:
- A computer with NixOS installed
- An active internet connection
Steps to Install Mealie:
Follow the steps below to install Mealie on NixOS Latest:
Open the terminal on your NixOS machine.
Update your NixOS system by running the following command:
sudo nix-channel --update
sudo nix-env -u
- Install Git to download the latest Mealie package. Run the following command in the terminal:
sudo nix-env -i git
- Clone the Mealie repository from Github. Run the following command:
git clone https://github.com/hay-kot/mealie.git
- Navigate to the cloned Mealie directory:
cd mealie/
- Create a
default.nixfile in the cloned directory using the following command:
nano default.nix
- Add the following configuration to the
default.nixfile:
with import <nixpkgs> {};
let
pyDeps = [
python3
python3Packaging
python3Tornado
python3SQLAlchemy
python3PyMySQL
python3nvchecker
python3passlib
];
in python3.pkgs.buildPythonPackage rec {
pname = "mealie";
version = "latest";
src = builtins.fetchGit {
url = "https://github.com/hay-kot/mealie";
rev = "latest";
};
pythonPath = "${python3Packages}:${pythonDeps}";
buildInputs = [
python3
python3Packages.setuptools
python3Packages.wheel
] ++ pyDeps;
meta = with stdenv.lib; {
description = "Recipe Manager and Meal Planner Application";
homepage = https://hay-kot.github.io/mealie/;
license = pkgs.lib.licenses.mit;
maintainers = with maintainers; [ ];
};
}
Save and exit the file by pressing
Ctrl+X, then pressYand thenEnter.Build Mealie by running the following command in the terminal:
nix-build
After the build is complete, you will find the Mealie package in the
result/directory.To install Mealie, run the following command:
sudo nix-env -i ./result
- After the installation is complete, start the Mealie server using the following command:
mealie serve
- Access Mealie by going to http://localhost:9000/ in your web browser.
Conclusion:
That’s it! By following these simple steps, you can install Mealie on NixOS Latest. Enjoy using Mealie and managing your meal plans and recipes!