From d025be66e6645e346fb0f90a619bc0e40b150a66 Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Mon, 17 May 2021 14:41:58 +0700 Subject: [PATCH 1/5] Create NIXOS_INSTALL.md --- NIXOS_INSTALL.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 NIXOS_INSTALL.md diff --git a/NIXOS_INSTALL.md b/NIXOS_INSTALL.md new file mode 100644 index 0000000..864acab --- /dev/null +++ b/NIXOS_INSTALL.md @@ -0,0 +1,55 @@ +# Installation (NixOS) +## Install methods +### Declarative Nix +To install with nix, create a `.nix` file like this and import it to your `configuration.nix` : +```nix +{ config, pkgs, ... }: + +let + archbox = pkgs.stdenv.mkDerivation rec { + name = "archbox"; + src = pkgs.fetchFromGitHub { + owner = "your_user_here"; + repo = "archbox"; + rev = "rev_here"; + sha256 = "rev_sha256_here"; + }; + sourceRoot = "."; + installPhase = '' + mkdir -p $out + cd source + export FORCE_INSTALL_CONFIG=1 + export ETC_DIR=$out/etc + export PREFIX=$out + export ARCHBOX_USER=your_user_here + export MOUNT_RUN=no + ${pkgs.bash}/bin/bash install.sh + ''; + }; +in +{ + environment.systemPackages = [ archbox ]; + environment.etc = { + "archbox.conf" = { + source = "${archbox}/etc/archbox.conf"; + }; + }; +} +``` +Configuration can be done by modifying `installPhase` e.g. : +```sh +mkdir -p $out +cd source +export FORCE_INSTALL_CONFIG=1 +export ETC_DIR=$out/etc +export PREFIX=$out +export ARCHBOX_USER=lemni +export MOUNT_RUN=no +export ENV_VAR="TERM=foot" +export SHARED_FOLDER=( /home /var/www ) +${pkgs.bash}/bin/bash install.sh +``` +### Regular Installation +See [INSTALL.md](INSTALL.md) +## Issues +See [issues](https://github.com/lemniskett/archbox/#nixos-specific-issues) From 91623a06fd8e46765495171ba816ac1e2c6ec0fd Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Mon, 17 May 2021 14:44:51 +0700 Subject: [PATCH 2/5] Update NIXOS_INSTALL.md --- NIXOS_INSTALL.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NIXOS_INSTALL.md b/NIXOS_INSTALL.md index 864acab..49e8de1 100644 --- a/NIXOS_INSTALL.md +++ b/NIXOS_INSTALL.md @@ -36,6 +36,12 @@ in }; } ``` +Replace `your_user_here`, `rev_here`, and `rev_sha256_here`. to get rev and sha256 you can do : +```sh +nix-shell -p nix-prefetch-git +nix-prefetch-git --url https://github.com/lemniskett/archbox.git +``` + Configuration can be done by modifying `installPhase` e.g. : ```sh mkdir -p $out From 985441cb8ae0d659f45f1f4608f2291b8069fff8 Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Mon, 17 May 2021 14:45:33 +0700 Subject: [PATCH 3/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index df24f11..1965922 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Ever since I'm running some niche distros like Void, Solus, I had a problem find ## Installation See [INSTALL.md](INSTALL.md) +For NixOS users, [NIXOS_INSTALL.md](NIXOS_INSTALL.md) For ChromeOS users, [CROS_INSTALL.md](CROS_INSTALL.md) ## Using Archbox ### Installing chroot environment From 730019afc8918282e09970cb8257f05b5ac65c54 Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Mon, 17 May 2021 14:45:57 +0700 Subject: [PATCH 4/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1965922..310f0f7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Ever since I'm running some niche distros like Void, Solus, I had a problem find See [INSTALL.md](INSTALL.md) For NixOS users, [NIXOS_INSTALL.md](NIXOS_INSTALL.md) + For ChromeOS users, [CROS_INSTALL.md](CROS_INSTALL.md) ## Using Archbox ### Installing chroot environment From 9dcaf7378943b4fd5a95c1607828ec2e1d829e16 Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Mon, 17 May 2021 20:28:31 +0700 Subject: [PATCH 5/5] Update NIXOS_INSTALL.md --- NIXOS_INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NIXOS_INSTALL.md b/NIXOS_INSTALL.md index 49e8de1..7c014de 100644 --- a/NIXOS_INSTALL.md +++ b/NIXOS_INSTALL.md @@ -9,7 +9,7 @@ let archbox = pkgs.stdenv.mkDerivation rec { name = "archbox"; src = pkgs.fetchFromGitHub { - owner = "your_user_here"; + owner = "lemniskett"; repo = "archbox"; rev = "rev_here"; sha256 = "rev_sha256_here";