From 6d2c1f692e83e66eca41aad0e402ab9cd4c96af7 Mon Sep 17 00:00:00 2001
From: Eggflaw <108559753+Eggflaw@users.noreply.github.com>
Date: Tue, 2 Jul 2024 20:22:28 +0900
Subject: [PATCH] Add Nix installation method (#11)
---
pages/getting-started/1-installation.mdx | 59 ++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/pages/getting-started/1-installation.mdx b/pages/getting-started/1-installation.mdx
index fd2f183..e4442a2 100644
--- a/pages/getting-started/1-installation.mdx
+++ b/pages/getting-started/1-installation.mdx
@@ -92,6 +92,65 @@ yay -S [PACKAGE_NAME]
Only one of these AUR packages must be installed at a time in order to prevent conflicts.
+### Nix
+
+macOS* and Linux users can use [Nix](https://nixos.org/) to install Lune.
+
+
+ *the macOS build is currently broken. Help is wanted debugging [it](https://github.com/NixOS/nixpkgs/blob/36f9963ac7ea0a471c1d408e90edec093a819d83/pkgs/development/interpreters/lune/default.nix).
+
+
+
+Imperatively
+
+**NixOS**
+
+```sh copy filename="Bash"
+nix-env -iA nixos.lune
+```
+
+**Non NixOS**
+
+```sh copy filename="Bash"
+nix-env -iA nixpkgs.lune
+# If you are using flakes
+nix profile install nixpkgs#lune
+```
+
+
+
+
+Declaratively
+
+**With [home-manager](https://github.com/nix-community/home-manager)**
+
+```nix copy filename="nix"
+home.packages = with pkgs; [
+ lune
+];
+```
+
+**system-wide NixOS configuration**
+
+```nix copy filename="nix"
+enviroment.systemPackages = with pkgs; [
+ lune
+];
+```
+
+
+
+
+Temporarily
+
+You can temporarily use Lune in your shell. You can use this to try out Lune before deciding to permanently install it.
+
+```sh copy filename="Bash"
+nix-shell -p lune
+```
+
+
+