# Unattended installation + deb package for aarch64 (Debian on RPi 4B+)

**URL:** <https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675>\
**Category:** Feature Requests\
**Created:** [February 27, 2023, 3:02pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675 "2023-02-27T15:02:11Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 6, 2023, 4:30pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/21 "2023-03-06T16:30:38Z")

</div>

> [@alexdelprete](#):
>
> That’s why I think it’s better having a public URL: so you are free to change the contents without breaking automation scripts. Meanwhile I’ll write the one-line via echo, but I’d recommend having it published as the keyring file.

That should be an easy fix!

> [@alexdelprete](#):
>
> So, to summarize, in order to easily install flox I see these macro-steps (that can easily be scripted):
> 
> 1. download flox apt source list in /etc/apt/sources.list.d/
> 2. download keyring in /usr/share/keyrings/
> 3. **apt update && apt install flox install** (install flox system package)
> 4. **flox pull -e flox/default --force** (I would also create the default environment in this step, before installing the first package)

Would it be simpler to just have steps 1-3? At which point `flox` is `/usr/bin/flox` and everything is good to go?

> [@alexdelprete](#):
>
> That is my $0.02, thanks for the brainstorming Matthew. 🙂

Thank you we appreciate the feedback!

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [March 6, 2023, 4:52pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/22 "2023-03-06T16:52:35Z")

</div>

> [@mkenigs](#):
>
> Would it be simpler to just have steps 1-3? At which point `flox` is `/usr/bin/flox` and everything is good to go?

That would be perfect, if it also creates the default environment. Just apt install and you’re good to go. Awesome! 🙂

One other idea: for people that come from nix-env, it would be awesome if the `apt install flox` would take care of the nix uninstall. Right now I have this in the script to uninstall nix cleanly:

```bash
# Remove nix
if [-e $HOME/.nix-profile/bin/nix]; then
    echo "Remove Nix multi-user"
    echo "- removing Nix daemons"
    systemctl stop nix-daemon.service &> /dev/null
    systemctl disable nix-daemon.socket nix-daemon.service
    systemctl daemon-reload
    echo "- removing Nix files/folders"
    rm -f /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket /etc/tmpfiles.d/nix-daemon.conf &> /dev/null
    rm -rf /nix /etc/nix /etc/profile/nix.sh ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels &> /dev/null
    echo "- removing Nix users"
    for i in $(seq 1 32); do
        userdel nixbld$i
    done
    echo "- removing Nix user group"
    groupdel nixbld
fi
[-e "/etc/bash.bashrc.backup-before-nix"] && echo "- restoring bashrc pre Nix" && mv /etc/bash.bashrc.backup-before-nix /etc/bash.bashrc
[-e "/etc/zsh/zshrc.backup-before-nix"] && echo "- restoring zshrc pre Nix" && mv /etc/zsh/zshrc.backup-before-nix /etc/zsh/zshrc

```

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [March 9, 2023, 1:01am UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/23 "2023-03-09T01:01:29Z")

</div>

@mkenigs Matthew, I forgot one thing: it would be really nice to be able to pre-configure what’s needed to [share environments](https://floxdev.com/docs/share-environments/). I’m referring to the GH token , and also, for the push command, to be able to have command-line options to pass the token so we can actually have a real unattended installation, without prompts, etc.

In the .config/flox folder there are config files automatically created, and it’s specified not to edit those, but it would be awesome having those in a dotfiles setup so you have everything setup when installing the first time.

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 9, 2023, 4:50pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/24 "2023-03-09T16:50:29Z")

</div>

> [@alexdelprete](#):
>
> One other idea: for people that come from nix-env, it would be awesome if the `apt install flox` would take care of the nix uninstall. Right now I have this in the script to uninstall nix cleanly:

`apt purge` should be getting rid of Nix - are you noticing that it’s not?

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [March 9, 2023, 4:54pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/25 "2023-03-09T16:54:24Z")

</div>

I followed nix docs to uninstall: [Installing a Binary Distribution - Nix Reference Manual](https://nixos.org/manual/nix/stable/installation/installing-binary.html#uninstalling)

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 9, 2023, 4:57pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/26 "2023-03-09T16:57:06Z")

</div>

Oh sorry you meant when you’re installing flox initially, you want it to clean up a pre-existing Nix installation?

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 9, 2023, 5:02pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/27 "2023-03-09T17:02:48Z")

</div>

We definitely need to streamline the experience when Nix is already installed. I think it’s a bit invasive to completely uninstall `/nix` though, as that could contain software the user still wants to use directly with Nix

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 9, 2023, 5:03pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/28 "2023-03-09T17:03:24Z")

</div>

> [@alexdelprete](#):
>
> Matthew, I forgot one thing: it would be really nice to be able to pre-configure what’s needed to [share environments](https://floxdev.com/docs/share-environments/). I’m referring to the GH token , and also, for the push command, to be able to have command-line options to pass the token so we can actually have a real unattended installation, without prompts, etc.

Opened an issue to track this internally!

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [March 9, 2023, 5:23pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/29 "2023-03-09T17:23:13Z")

</div>

> [@mkenigs](#):
>
> you meant when you’re installing flox initially, you want it to clean up a pre-existing Nix installation?

Exactly. I’m migrating all servers to flox, and used nix on all of them. 🙂

> [@mkenigs](#):
>
> I think it’s a bit invasive to completely uninstall `/nix` though, as that could contain software the user still wants to use directly with Nix

Well, since flox sits on top of nix, a sort of “conversion” of the installation should be possible, right? Or it’s necessary to start from scratch because you have a specific setup? So when you `apt install flox`if nix is already installed, you modify/integrate that into flox. Something like that…

> [@mkenigs](#):
>
> Opened an issue to track this internally!

You mean on the GH repo?

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 9, 2023, 5:42pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/30 "2023-03-09T17:42:10Z")

</div>

> [@alexdelprete](#):
>
> Well, since flox sits on top of nix, a sort of “conversion” of the installation should be possible, right? Or it’s necessary to start from scratch because you have a specific setup? So when you `apt install flox`if nix is already installed, you modify/integrate that into flox. Something like that…

Yes exactly, we attempt to do that, per the “Installing over a previous installation of Nix?” section of [flox in 5 minutes | flox:docs](https://floxdev.com/docs/) Did you run into an issue with how it’s doing that, or is there a reason you thought you needed to completely uninstall Nix? Sorry if I’ve lost track of something in the thread

> [@alexdelprete](#):
>
> You mean on the GH repo?

No something internal for us to triage

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [March 9, 2023, 5:48pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/31 "2023-03-09T17:48:35Z")

</div>

> [@mkenigs](#):
>
> Did you run into an issue with how it’s doing that, or is there a reason you thought you needed to completely uninstall Nix?

Well, frankly speaking: since I had problems installing nix in the past with the official procedure, I had to revert to ansible to properly install the daemon multi-user version on any server. So I didn’t really trust this “conversion” process described in your docs. So I removed it completely before installing flox.

But if you say the “conversion” works fine, and the `apt install flox` will take care of that, it’s all good. 🙂

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [March 9, 2023, 6:00pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/32 "2023-03-09T18:00:04Z")

</div>

Conversion is definitely a bit more error prone, but that would still be the recommended path. Please report issues though if you run into them though!

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [May 10, 2023, 6:05am UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/33 "2023-05-10T06:05:39Z")

</div>

> [@robinbrantley](#):
>
> Thank you for raising this issue (point 5 above). You are correct in that flox sits on top of nix and therefore the pkg repositories should be more or less on the same page but with a [staged approach](https://floxdev.com/docs/reference/concepts/stabilities/). Looking into your query further, we found an issue with our automation that we have now fixed so unstable should now offer the latest available as expected:

Hi Robin,

I noticed the same issue again, while trying to upgrade these two packages: **flyctl** and **chezmoi**.

If I check on `https://search.nixos.org/` last versions in the unstable channel are:

- chezmoi: **2.33.4**
- flyctl: **0.0.553**

If I check with flox:

```auto
❯ flox -V
Version: 0.1.5-r448-0.0.10-r234

❯ flox search chezmoi -v
chezmoi - Manage your dotfiles across multiple machines, securely
  stable.nixpkgs-flox.chezmoi@2.29.3
  stable.nixpkgs-flox.chezmoi@2.30.0
  stable.nixpkgs-flox.chezmoi@2.32.0
  staging.nixpkgs-flox.chezmoi@2.31.1
  staging.nixpkgs-flox.chezmoi@2.32.0
  staging.nixpkgs-flox.chezmoi@2.33.0
  unstable.nixpkgs-flox.chezmoi@2.31.1
  unstable.nixpkgs-flox.chezmoi@2.32.0
  unstable.nixpkgs-flox.chezmoi@2.33.0

❯ flox search flyctl -v
flyctl - Command line tools for fly.io services
  stable.nixpkgs-flox.flyctl@0.0.450
  stable.nixpkgs-flox.flyctl@0.0.456
  stable.nixpkgs-flox.flyctl@0.0.492
  staging.nixpkgs-flox.flyctl@0.0.498
  staging.nixpkgs-flox.flyctl@0.0.500
  staging.nixpkgs-flox.flyctl@0.0.509
  unstable.nixpkgs-flox.flyctl@0.0.498
  unstable.nixpkgs-flox.flyctl@0.0.500
  unstable.nixpkgs-flox.flyctl@0.0.509

```

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [May 11, 2023, 10:08pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/34 "2023-05-11T22:08:18Z")

</div>

Hi @alexdelprete - thanks for letting us know. This has been resolved and the correct versions should now be available in our catalog. Please let us know if you are seeing otherwise. 🙂

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [May 12, 2023, 12:53pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/35 "2023-05-12T12:53:59Z")

</div>

looks ok now, thank you.

I’m worried there could be other packages in the same condition, but I don’t have the time right now to check all the ones I’m using. Is this something that could happen again? How are the repositerories synced?

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [May 12, 2023, 3:28pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/36 "2023-05-12T15:28:10Z")

</div>

Hi @alexdelprete - thanks for your queries. The correction wasn’t just made for the 2 packages you mentioned. There is an automated process we have to update the flox catalog but unfortunately it had fallen over which went unnoticed. We restarted the process and now things are back to normal. We are also putting in better monitoring so if this happens again, we can be proactive and over time, if there is an underlying bug causing it to fall over, hunt it down and fix it. 🙂

---

<div class="post-metadata">

**Author:** ![alexdelprete](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/alexdelprete/32/554_2.png) [@alexdelprete](https://discourse.flox.dev/u/alexdelprete)\
**Post date:** [May 12, 2023, 4:24pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/37 "2023-05-12T16:24:55Z")

</div>

Thanks for your feedback @robinbrantley, you and all other team members that support us are always very kind and I much appreciate it. 🙂

Is the automated process a github action visible on the public repo? Glad that you will monitor it more closely so we don’t have to worry about not catching updates.

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [May 12, 2023, 9:27pm UTC](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675/38 "2023-05-12T21:27:28Z")

</div>

Thank you @alexdelprete - that was lovely to hear 🥰  
No, the catalog update process isn’t a github action but is instead a service that runs continuously on one of our internal infrastructure hosts.

[Previous page](https://discourse.flox.dev/t/unattended-installation-deb-package-for-aarch64-debian-on-rpi-4b/675.md?page=1)
