The nature of the KaOS distro makes it so, that we have a beautifully crafted, and inherently limited distribution.

Particulary the amount of available packages is a reason to use other distros, anyway how much we love it.

I found an alternative to porting packages from Arch and Flatpaks, that fits well into the existing ecosystem, and I like to share it with you here.

I am talking about the Nix package manager, that provides 80.000 packages,
compared to the 2200 in KaOS 🎉

The installation process is straightforward:

sh <(curl -L https://nixos.org/nix/install) --daemon

Follow the instructions and install the manager, you will be guided.

Then, add the following lines at the end of your ~/.bashrc to create some
convenient commands for the package management:

function add {
    nix-env -iA nixpkgs.$1
}

function remove {
    nix-env --uninstall $1
}

function search {
    nix-search $1
}

function update { 
    nix-env -u
}

Save the changes.
The binary to utilize the search is not yet installed, so lets reload bash and add it:

bash
add nix-search-cli

You also have a web GUI here: https://search.nixos.org/packages
And there are several desktop clients, all the maintained ones who are actually serviceable, are in GTK, though, that one being the best: https://github.com/snowfallorg/nix-software-center

(Use the 'nix-env' installation method.)

One of the downsides is, that Steam is not available this way, as it requires specific hacks who are not available outside of NixOS itself.

P.S: There is also another method, to manage Nix packages, that is a bit more advanced, and offers several advantages.

Let me know if you are interested in this, so I might write a guide for it.
In case you like to look into it yourself: https://github.com/nix-community/home-manager

Much fun 🌻

Do you consider this useful?

Yes
No

Nix installs environment (like flatpak does it, glibc everything other) and you could run executable in isolated environment or Nix installs environment (configurations and so, like Gentoo) and compiles the packages to native KaOS runtime?

    bvbfan Nix installs all to /nix in the root directory.

    As you can see, all software gets their own id, similar to a git commit.
    It is unique due to that, and cannot be confused or conflicted by other software.

    Nix is by design isolated, that includes other Nix packages.
    You can install different versions of the same package, all get their own id and place.

    If a package is not available in binary form then it compiles the software automatically for you.
    Almost all software is available as cached binary, though.

      shalokshalom If a package is not available in binary form then it compiles the software automatically for you.
      Almost all software is available as cached binary, though.

      If it's in binary form

      1. it resolves all depends (compile or get them from cache) or
      2. it is compiled statically (no external depends, only the linker)
      The Nix package manager ensures that the running system is consistent with the logical specification of the system, meaning that it will rebuild all packages that need to be rebuilt. For instance, if the kernel is changed, then the package manager will ensure that external kernel modules will be rebuilt. Similarly, when a library is updated, it ensures that all the system packages use the new version, even packages statically linked to it.

      https://en.wikipedia.org/wiki/NixOS
      It answers my question, the problem is binary interface between compilers even versions of same compiler is incompatible, so NixOS cache has all (or most) packages build on top of different compiler versions and/or different compilers.
      Interesting concepts, there is some limitations, related to binary interface stability, but they could be mitigated, probably static build would fix most of them.

        a month later

        The update command above does lack an update of the database.
        I also use the outdated function syntax for bash.

        Both is fixed here:

        add() {
           nix-env -iA nixpkgs.$1
        }
        
        remove() {
           nix-env --uninstall $1
        }
        
        search() {
           nix-search $1
        }
        
        update() {
           sudo nix-channel --update && nix-env -u	
        }

        Hello, very interesting and very simple. Two easy questions:

        • Can this create issues on the current installation? I'm a bit scared by mixing packages
        • Is there any convenience to use these Nix packages instead of Flatpaks?

          kaos_user You have about 80.000 Nix packages. Flathub speaks of 'hundreds' of packages. I am sure there are also other differences, but this one should be enough.

          And Nix packages are not mixing up with other packages, as they are saved in their own /nix directory.

          5 days later

          Curioser and curioser!
          As I told u previously in KDE fb, I consider your suggestion of integrating Nix packages very appealing. Once you have become a long journey Linux distro wanderer like myself, and you get to familiarize with a more protected and amazingly safer and stabler Os like KaOs at present..you always miss your old successful Linux wandering habits added to your latest experience, packages like Spotify, Stremio, OnlyOffice and others could be tested running along with KaOs and see how they do. Thanks so much for sharing.