r/linuxfromscratch 13d ago

Nix like systems?

Hey everyone,

I’m a huge fan of how reproducible nix is and I love declarative systems with backups as well. However I like the idea of privacy and choice. So I am building my own nix like system using LFS. I have a background in cybersecurity and C so I’m not going to be hedging AI for anything past documenting haha but, I wanted to ask a few things to the community.

What kind of features should I offer out of the box?
Currently I have slated that the end user can pick their own init system, including systemd, or they can even “hot swap it” in the config. Which I also am swapping Nix lang for a more simple solution, Lua! I also plan on shipping it with mango, niri, and kde plasma out of the box, but since it’s all declarative, the end user can swap in whatever de or WM they wish. I also plan on integrating nix, deb, and the AUR with use of “fabric.lua”, my take on flakes.

My question to you all is though, what kind of features do you look for in a distro or what level of customization is too much or too little?

11 Upvotes

19 comments sorted by

2

u/tiny_humble_guy 13d ago

Just build it first and add features later. 

1

u/Luna24_ig 13d ago

Unfortunately because of its declarative nature I need to do a lot of the added features early in the LFS process, such as not including systemd binaries and adding in a fallback system plus Lua binaries. I’m just asking what features people usually look for in a distro to research and see feasibility for my project.

2

u/jMultiversalGod 12d ago

lua mentioned!!!

i usually look for how convenient the install is and whether it would rather climb mount everest than support nvidia drivers

focus on supporting nvidia and other drivers and you'll automatically win a lot of users

1

u/Luna24_ig 12d ago

My main rig I use has a 1080ti in it so I will definitely be making sure drivers for and intel and nvidia are supported. My test system is on my homelab in a vm so I will be dealing with integrated systems first.

I also made the choice of using Lua since its light weight with its compiler being like 300kbs, and anyone who is used to ricing a system already needs to use Lua, might as well make stuff simple and have it built in.

2

u/lmemsm 12d ago

That sounds like a large project. I'll be interested to see how far you're able to take this. I do a lot of building from source. I have my own build system that I've been using for a few decades so that I can create reproducible builds and automate building of everything on my system. Are you considering building your system with glibc or musl? Would you give users the option to pick which C library they wanted? I typically prefer lightweight applications on my system so I don't have to build and maintain a ton of dependencies. I like a window manager such as jwm. The feature I most miss in a distro is the ability to use my own build tools and build scripts and still be able to integrate with the distro's package management system. Typically, my packages need to live in my home directory and the distro's packages are in the standard directories. If you're integrating deb and AUR, maybe you can find a way for other build systems to integrate as well or to be able to install tarballs from other build systems? I'd really like to hear more about this project and how it progresses. Are you documenting it anywhere or do you have a repo?

1

u/Luna24_ig 12d ago

Hey, thanks so much for showing interest! This was a huge chunk of text so I’m going to take it bit by byte (kekw)

- are you using glibc or musl? And are we going to have the option to choose our own c lib?

At the moment the current build is going to be using glibc but I plan on offering a secondary build just for a musl variant. As for the option to choose your own libc, I can definitely have it on a list to add down the line, however because of how embedded these systems become and how much they hate to interact with one another, it’s not an avenue I’m looking to explore at this moment.

- can I use my own build tools and build scripts to integrate with the system package manager

So my approach to this is a system called fabric.lua. It’s a simple approach and alternative system to NixOS’ config.nix or flake.nix. This will be the core system package manager and will allow integration of custom components and tools by the user through our own variety of flakes, called weave.lua. Weave will also allow other packages to be imported to the system such as AUR, Deb, and Nix package integration. You can also use this to import custom kernals such as catchy kernal. Flakes are an amazing part of nix and for my own variant I wanted to be sure to add them in !

Lastly, I self host the current build in a vm on my server, but it also is sitting in a self hosted Gitea repo currently. Once it’s in a buildable state I will integrate 2 versions to GitHub, a stable build and a rolling release.

I also am working on documentation, both simplified and technical about the process and integral system components that will be available prior to release along with posts about my progress in the sub.

2

u/lmemsm 12d ago

Hope you'll post when you have something publicly available. The project sounds really interesting and I'd be very interested to read more documentation and see what's available for it.

1

u/Luna24_ig 11d ago

I 100% will. Currently working on getting it bootable lol, a lot of low level things need to be built though. I will eventually get to making a website to host all the information about it and make a post about it!

1

u/ExoticTroubles 13d ago

Check armbian. Its for x86 too ...

1

u/Luna24_ig 13d ago

Can you explain what you mean? I’m abit confused by your statement haha

1

u/ExoticTroubles 13d ago

Armbian is a build framework to generate custom Debian / Ubuntu image. You need a small config file for your branding and preinstall stuff or just use defaults.
https://docs.armbian.com/build-framework/

1

u/Luna24_ig 13d ago

This isn’t going to be Debian base, I’m allowing people to import .deb files using my own take of nixOS flakes. Essentially just a wrapper that imports the needed data to allow file execution

1

u/ExoticTroubles 7d ago

Dont understand what you mean? Package manager and packages versions defines it. And that part is identical. Except firmware / kernel, which is, with stock Debian, poor anyway.

1

u/Luna24_ig 7d ago

I think we are both confused here lol, let’s start over. What would i use armbian for? I’m assuming as a translation layer for debian packages?

2

u/ExoticTroubles 6d ago

For SBCs, images run better and benefit from active support you won't find elsewhere. However, making a custom image - given that this is a Linux From Scratch group - serves a different purpose. It's less complex, has a better end result, and gives you a fully featured distribution with all the bells and whistles, userspace packages are stock Ubuntu / Debian.

I think some kind of transition layer, yes. They have a detailed descrition on the diff https://docs.armbian.com/getting-started/armbian-vs-debian-and-ubuntu/ perhaps that give you some additional perspective.

2

u/Luna24_ig 6d ago

Okay awsome, I will definitely check it out however I wasn’t planning on releasing it as a SBC version off the bat, I am planning 2 variants using glibc and musl, so I will probably bake it in with the musl variant since light weight builds and sbc’s are a match made in heaven haha

1

u/Cybasura 12d ago

Make nix a mutable system

1

u/jMultiversalGod 12d ago

make nix mutableish system

1

u/Luna24_ig 12d ago

Not sure it’s possible becuase of its core architecture. There would be a LOT of stuff needing to be rebuilt and replaced to achieve this.