Fleek - User friendly home-manager

This is what I understand as a valid usecase, JSON supporting nix, though would you want to replace all the nix with some static JSON/YAML/TOML?

2 Likes

@bketelsen I’m impressed by the presentation of https://getfleek.dev/ and the amount of work that has gone into the UX of this project. It shows that you care about the users.

I’m not happy with the dunking that is happening in this thread. It’s effectively shutting the conversation down. The author has put a lot of effort into this project so the minimum would be to be respectful.

46 Likes

Trust me, I appreciate any tries that make nix more approachable, though this is not.

This tries to hide nix behind YAML, and by briefly skimming the docs, I was unable to see a way to combine this with real nix, in case I have to do something thats not expressible in the YAML.

This even seems to generate a flake under the hood, but requires imperative steps for installation “outside” of nix, why not just nix run … -- init, and generating a config, that would just include a self-managed fleek from then on, similar to HM does it with programs.home-manager.enable = true?

OP asked for how they could improof fleek…

So I will rephrase my initial rant into this suggestions for improvements:

  1. Make use of flake-apps for the bootstrapping
  2. Do not use YAML as primary source or the only supported format, but allow for using actual nix!
    Without this being changed, fleek will not be able to gain much adoption. As there will be no way around its own limitations.
  3. Document how to translate HM options to fleek options
  4. Document how to use services (is that possible at all? Didn’t find them in the docs at all)
5 Likes

People here who have persevered through the pain of learning the language might have a slightly biased perspective, here.

Personally, it took me longer than otherwise necessary to become comfortable with nix as a whole because the language was not effortless to grasp.

8 Likes

Matching the Power of Nix with User Expectations and good Marketing is a missing link in the Nix Ecosystem Value Chain.

And,
— deep in our hearts — we’re probably all aware.

I very strongly commend this effort.

It is necessary.

6 Likes

I’ve been wanting to do this for a while, and thus made a start with nixos-flake and nix-dev-home. The “let the user interactively pick some basic preferences” part can be facilitated by enabling nix flake template to take in parameters: Feature request: Flake templates with variables · Issue #4017 · NixOS/nix · GitHub

I appreciate projects like fleek, and I like the motivation and idea behind them (enable use of the Nix ecosystem but using a friendly UX), but I’d also like to be able to write Nix itself. Surely there must be a way to use a subset of Nix to provide that friendly UX?

3 Likes

How would you recommend me the give my feedback without it being considered as “dunking” according to you?

OP has asked to get feedback from HM/Nix users and that’s exactly what I did. To me it seems as if every negative feedback will come out as “dunking” from your view.

1 Like

The pure data subset of Nix can be understood in 5 minutes if the reader has prior JSON/YAML knowledge. If we had better language support and tooling (similar to jq but for Nix), then it would be more likely for tool writers to use Nix instead of those serialization languages. This is also true inside of nixpkgs where we are tempted to use JSON over Nix due to that convenience factor.

9 Likes

I’d say that in the past year the Nix language situation has got infinitely better, we have a very good LSP (nil), we have a library functions search engine (noogle) and a pretty good general language tutorial on nix.dev (Nix language basics — nix.dev documentation).

I would understand complaining about the Nix language learning situation before these improvements came out this year, but that isn’t the case anymore.

5 Likes

This is because everyone confused the languages syntax and minimal builtin function set with all the applications and frameworks introduced through nixos-modules and nixpkgs.

At its heart, “nix” the expression language is not much more than “JSON with functions”.

For using basic HM and NixOS configuration, you can even treat it like that… And when it comes to the point where you can’t anymore, YAML won’t help you either.

6 Likes

Should we start a separate thread on how to provide constructive feedback? I don’t mean to distract this thread. Or DM me.

9 Likes

I think that’d be a good lesson for many people in the community (including myself). So yes, if you feel like it.

Another reason why my feedback wasn’t that constructive is because I have a big pet peeve in tech when people create new projects to solve a problem that has already been solved (in my opinion) or if I don’t think it’s even a problem in the first place.

My feedback basically boiled down to this:

  1. Why use YAML when Nix is already simple?
  2. One of the main principles of Nix language is being functional and you are just taking that idea and throwing it out the window? To me at least, if Nix wasn’t a proper language then I might not even consider using it in the first place.
  3. @max suggested having an interactive interface for creating flakes which I then went ahead and linked a project that already achieves it. This takes us back to the pet peeve I have I mentioned above.

EDIT: OP has asked to be given feedback on a specific aspect of their project and I went ahead and gave feedback on a more general aspect of the project which OP didn’t ask for. I take this fault on me.

2 Likes

@bketelsen Can you link me some of the generated flakes? because I would like to actually give some proper feedback on them because that’s what you actually asked for in the first place. I couldn’t find any example generated flakes in the repo (the repo has no Nix code in it basically). Maybe it’d be good to add some examples of the generated flakes? I’ll create an issue for that on the repo. (Provide examples of generated flakes · Issue #124 · ublue-os/fleek · GitHub)

EDIT: Is this it? https://github.com/ublue-os/fleek/blob/2b0a2da77cf1c102c259218b06942efe61253dbf/internal/flake. It seems to be using some templating engine right?

1 Like

Great idea, I’ve got a PR inbound with examples here pull request

my feedback as someone who hasn’t used it, and … sorry, will never use it, since I am not the target audience.

The documentation seems very good, as to what it is and how do install/use it seems very simple and clear.

The commands also seems very clear and well thought out. The webpage design is also very well done!!

Congrats on the presentation… It makes me want to use it !!!

In my opinion, again, as someone who hasn’t used it and 99% probably never will, and in my non important opinion, I see this as a great thing. coupled with calamares installer + fleek that seems easy and slick way to manage packages, it could reach people that like or want this usage. I see probably some people then move to nix or nickel when available, or just keep it like this, and not do any kind of coding.

Either if it is nix / nickel / scheme / haskel / assembly / whatever or YAML, I think the important thing is to allow NON IMPERATIVE ways to manage the system.

Just my non important opinion, from a non important person.

4 Likes

@bketelsen awesome project ! I have just tried fleek while setting up a new Mac and together with DeterminateSys’s installer (thanks to @grahamc and his team) this was the kind of UX that will take Nix to the next level :rocket:
Note that I’m pretty experienced with Nix (over 6 years) and I find this super useful, so I don’t think the target would be only new Nix users :slight_smile:

Minor comments:

  • I think it would be nice if fleek add <pkg> would check if the package actually exists, this will make it slower but prevents doing few adds then having to check what was the wrong pkg.
  • maybe a fleek edit subcommand can be added which opens ~/.fleek.yml in $EDITOR
  • is there a way to see the nix or home-manager commands executed ? if not yet available, might be nice to have that when some environment variable is set or simply through --verbose

I might come up with more feedback as I continue using :slight_smile:

9 Likes

Just to clarify, since it seems like a lot of folks chiming in here did not look at fleek’s actual features:

Fleek allows configuration via nix files for those that want that in addition to the yaml basic config.

Fleek also prominently notes a feature that helps you migrate from fleek to standard home-manager config once you become comfortable with nix and no longer want to use it. In my opinion, that’s an incredible feature, and one that makes it much easier for me to recommend nix and home-manager to people to try out.

While the nix language may arguably be simple and elegant, nixpkgs and home-manager are complex enough that I’ve seen them turn away many people (including myself multiple times in the past), so having an easy way to start with a straightforward migration path to the standard way seems incredibly valuable to me.

15 Likes

This project is amazing! I think its great to have a simple onboarding process to start getting the benefits of declarative environments without having to understand nix. And the fact that any point you can eject the config into pure nix means that complexity isn’t hidden and there is encouragement to understand complexity when you have the context and time/energy to do so.

3 Likes

As someone who’s not a regular user of Home Manager, I saw the modest announcement which suggested to me that this was in really early stages, read that this was a wrapper for HM, read the comments that were about the YAML configuration files, and figured it probably wasn’t for me. I mentally set it aside pending subsequent releases, more substantive discussion, or some other reason to check it out.

Then tonight, I stumbled upon a link to the Fleek website and I was super confused. It went something like this:

Didn’t I remember seeing a Discourse post about a really new project of that name? This couldn’t be it.

That project was barely getting started… but this one has a really nice website! Weird.

That project was for people who wanted to avoid the Nix language… but this one has this super cool eject subcommand for exposing its configuration natively in the Nix language and a NixOS-like module system, with all their usual flexibility and power. Wow.

That project was for people who use Home Manager… but this looks like an awesome replacement for my current usage of nix profile for semi-permanent changes when I don’t want to bother to open an editor. Huh.

What the hell happened?? Are there two projects with the same name? Did I trip out and mistake a year old post for a days old post the other day?

Needless to say, I really had the wrong idea about what this project was for, how ready it is for testing, and whether I was in its intended audience. lmfao

I look forward to messing around with this tomorrow when I want to avoid some other work. :slight_smile:

5 Likes

List of strings with each corresponding to the package name. This won’t help you with overrides but it gets you far.

Here in the end we will want to have say the module system as a front-end. And I can very well imagine even a tool such as fleek in front of that or in conjunction, that is, configuring through the module system using both nix and toml.

1 Like