Live data from Hacker News

Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

github.com

71–80 of 206 posts

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#71
post #32

I've never used Nix, but it sounds interesting. I get the impression it's more used on desktop, but I'm curious if anyone has used it on servers?

Yes. I know Shopify does (or at least did), I believe Target was a relatively early adopter. I think Tailscale dabbled with the idea. Everything feels quite stable from a server admin perspective, though there are still various competing methods to actually administer fleets of machines. Nix Ops is a bit opinionated but works okay. I just build locally or in CI and push to hosts remotely.

FWIW Shopify used nix-shell for the developer environment. If all they need to do is import standard packages - it's actually quiet a good solution for multi-platform dev environments.

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#72
post #9

What a coincidence. I was just asking about NixOS on Mastodon. Reposting (I'm on a mobile, little time to type): " a question on dev environment isolation. Is either #NixOS or #GUIX usable as an OS for day-to-day use (coding, browsing, occasional gaming)? Or is it better to just use their respective package managers on top of regular Linux? Also, anyone here doing desktop #virtualization? Is there a sense of running…

Kind of orthogonal to your questions, but perhaps it helps:

NixOS solves OS-level issues. If you don't appreciate that you're having them, or you're solving them by other means, you might not see the appeal.

I tried NixOS on three separate occasions before it stuck. My existing setup is based on Debian and templating config files across machines (small heterogeneous network). This system can rebuild any machine from a blank slate, and so the first two times I tried NixOS I didn't see what it could give me - my configuration was already quite declarative and centralized.

The third time trying NixOS, I was aiming to make an image for a Raspberry Pi (after a Raspbian apt-get upgrade had borked a system once again). Seeing that I could make a full build from source, cross compiled or emulation compiled, with a few lines in a config file made it all click. It felt reminiscent of the Lisp curse where such a thing isn't well documented, because it's just second nature once you understand the system. I've only felt that level of paradigm changing expressive power a few times, and NixOS was one of them.

What is keeping me heading in the NixOS direction is the greater source accessibility. I've run Debian for 20+ years, and I still don't routinely modify existing packages. Whereas with Nix it's second nature because it's essentially a source distribution.

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#73
post #68

Having worked in a large Nix dev environment, the difficulty in understanding what was going on meant devops were needed for the simplest changes. Ended up being a blocker for every project I was on. Love the idea but really really dislike it in practice. NixOS is cool though.

This matches my experience.

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#74

Earlier quoted context omitted.

I have no opinion about NixOS but every time I read someone touting its merits I feel like I live in a parallel universe. NixOS seems to solve problems I never had at extreme costs to its general usability. I don’t care that I can rebuilt a computer identical to mine in minutes. I don’t change computer often enough for it to matter and the tweaking I do is minimal because frankly tweaking configuration is not fun and…

> it seems to me like it’s competing with docker and kubernetes and I have never seen a convincing argument about why it would be better. This seems to indicate a huge mismatch between what you think Nix/OS is compared to what it actually is. NixOS is for creating/maintaining systems, Docker is for running applications and Kubernetes is for running applications but across multiple servers, neither of those tools are…

> Docker is for running applications

Yes but no. Docker is mainly used for its ability to build and reuse standardised containers. It’s very much a distribution mechanism (I mean that’s why it’s called docker). From other comments I get the feeling that NixOS could be used to build reproducible containers in a way that remind me of building tools like Bazel but it’s not entirely clear to me why you would chose to do that nor if it’s actually a goal of the product.

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#75
post #5

As usual, those who have learned Nix have completely forgotten what was difficult about it in the first place. And those who haven't are so confused that are unable to ask good questions.

Ian Henry has, thankfully memorialized the learning process so that we can all readily rediscover it. https://ianthehenry.com/posts/how-to-learn-nix/introduction/

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#76

A lot of odd Nix hate in here, or at least extreme dislike. NixOS is so very usable. There are a lot of foot-guns but that's true of Linux systems. It takes some time to get comfortable with all the different ways to configure stuff. There's a new language, a new build system, a new Linux distribution. I've spent very little time relative to say, figuring out dpkg or systemd, or learning Bash or C or Perl, or learnin…

> A lot of odd Nix hate in here, or at least extreme dislike.

I don't have any doubts about the likes of Nix or even other attempts at improving the reproducibility of building and installing packages being technically superior to what we have now in some ways.

But at the same time, you can't forget about people and in some ways the industry taking the path of least resistance whenever possible.

You want to introduce a good but somewhat complicated way to manage packages? People will simply use "apt" while its UI/UX/DX is easy to get a hang of.

People get sick of differences between environments and how hard it is to deal with everything from resource constraints, port binding, configuration management, persistent data handling etc. in *nix? Many of them will turn to shipping VMs, tools like Vagrant or more recently - Docker.

Thus, it stands to reason that for any tool to become popular amongst the "common folk", not just brave early adopters or very technically able people, the tool needs to be easy to use.

I guess that's also why i'd say that more people use Linux distros (GNU or otherwise) as opposed to something like the *BSD OSes, even if those also have some notable benefits in regards to stability, networking performance, in-tree development etc.

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#77
post #51
post #48

I think NixOS would benefit from easily accessible collection of opinionated modules/profiles/configurations with minimal set of options. Something like gnome-desktop / sway-desktop / etc. Gnome actually does pretty good job here. The point is: currently my NixOS and Home Manager configurations have over 2k LOC total. When you search for configurations on GitHub/Google you are likely to find complex ones. For example…

Yes, that's how I learned nixos -- moderately on the sparse documentation, highly on other people's code. I was shy on the #nixos channel. Now I have a working setup which spans all of my computers and servers (I also have autodeployment scripts for aws and netboot). I use the devos flake as a template, check this out: https://github.com/divnix/devos

The NixOS wiki has a good comparison page for templates like devos:

https://nixos.wiki/wiki/Comparison_of_NixOS_setups

This is the other big one (most stars): https://github.com/hlissner/dotfiles

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#78

Earlier quoted context omitted.

> I have a Windows VM on a NixOS host for gaming, was really quite convenient to set it up, I set it up on a separate drive to be able to boot native too I've been planning on doing exactly this, but haven't had the time to figure out the best way of going about it. Is there a good guide/write up you'd recommend? (I already have a Windows 10 install on a separate SSD, but I rarely boot it because I can't stand the OS…

So first I did this I did it on manjaro using this archwiki article: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF When I moved to NixOS I just did a normal NixOS install and applied the same parameters to kernel boot as before and passed the GPU through. I was using looking-glass at first, but my computer is too slow and crappy (memory bandwidth seems to choke) to run 144fps in overwatch. You just pass t…

Overwatch is also highly optimized via Wine, if you're looking to play. I'm on 6-year-old hardware (i5 4460, GTX 1050ti) and I have no problem hitting 120+ FPS in-game.

https://www.youtube.com/watch?v=voXc1nCD4IA

This video is a pretty good demonstration of how neck-and-neck the performance is these days. Frankly, I feel like it stutters less in Linux, but I might just be imagining things.

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#79
post #9

What a coincidence. I was just asking about NixOS on Mastodon. Reposting (I'm on a mobile, little time to type): " a question on dev environment isolation. Is either #NixOS or #GUIX usable as an OS for day-to-day use (coding, browsing, occasional gaming)? Or is it better to just use their respective package managers on top of regular Linux? Also, anyone here doing desktop #virtualization? Is there a sense of running…

> Is either #NixOS or #GUIX usable as an OS for day-to-day use (coding, browsing, occasional gaming)?

Yeah, definitively. I use only NixOS on all my machines for about 3 years already. My machines are working so well nowadays that I rarely have to change anything [1], even during major upgrades (between stable versions).

I don't fear anymore if a machine could break tomorrow. I know that it will be very easy to restore it to a working state. Last time my working notebook broke I didn't even bother making a backup (except from some data on my Home), just installed my config and it worked exactly it was working before. Also, I don't fear changing my system: if something brokes after the changes, I can just rollback.

I use for all those three purposes, mainly coding and browsing, but some light gaming. Steam actually works better on NixOS than any other distro I tested before thanks to the isolation that Nix provides.

> a question on dev environment isolation. [...] Or is it better to just use their respective package managers on top of regular Linux?

I imagine those are part of the same question. Generally what I recommend for newbies is to start small: yeah, it is fine to continue using your respective package manager, specially if you don't need "native compilation" [2].

After you get more experience with Nix though, I would recommend you to start isolating your development environments. Nix has its own `nix-shell`, that it is kinda bare-bones but works well, and can be very practical once you use something like `nix-direnv` (https://github.com/nix-community/nix-direnv/). There is also this `devshell` (https://numtide.github.io/devshell/intro.html) project that is interesting.

> Also, anyone here doing desktop #virtualization? Is there a sense of running a #VM per project? Is that a viable alternative to dual-booing Windows when I want to do some Windows dev or play a game?

I put those two questions together because yes, I ran desktop virtualization on NixOS, and yes, I ran Windows on a VM to play games thanks to PCI-e passthrough (my dedicated GPU is connected directly to the Windows VM so the performance is near native) [3].

Again, I will not recommend you do to this right after starting NixOS since it is one more thing to possible frustrate you, but just so you know that it works and works well, specially because my VM configuration on NixOS is also on my `/etc/configuration.nix` and it is fully reproducible. Coincidentally I was messing with my VM settings yesterday and "broke" my VM multiple times, however I just run one command and restored it to the previous state.

However I never bothered to dual-boot NixOS/Windows, because I barely use Windows nowadays so I find rebooting my system just to use Windows bothersome. Probably not your case, so maybe dual-boot makes more sense. This article should help and seems very easy to do (again, disclaimer, not tested because I never needed it): https://nixos.wiki/wiki/Dual_Booting_NixOS_and_Windows.

About the VM per project, unless you want to do this for some other reason (security maybe?), you don't need to. As I said before, you can use things like `nix-shell` and this will already give isolation enough for development purposes.

---

Some closing words: remember, start small! Nix/NixOS is a journey. You will learn eventually what you need. However, if you try too many things at the same time you will feel frustrated. The official documentation is good, however it kinda assumes that you know what we are talking about already, and it is also very big and not well separated in steps, so it feels overwhelming for newbies. To supplant this there are many blog posts, however some of them are out-of-date (it shouldn't be too much of an issue though, since Nix tries really hard to backwards compatible).

You will eventually need to learn the minimum of the language to read the source code. It is less difficult than it seems, because while Nix as a language is strange at the first glance, it is a very well designed DSL for the domain. After sometime editing your own configuration you will naturally learn the Nix language, and can start to understand what is happening.

For where to start, I recommend trying to replicate your current system in a NixOS install. If you already use another Linux distro try to get the same desktop environment and packages that you already use. If you're coming from Windows/macOS try Gnome or KDE. Just tweak the system until you're happy with the result. Eventually try Home-Manager to manage your Home configuration in the same way as in NixOS (fully declarative), and once you feel happy, you can try Flakes (making you configuration fully reproducible). This process can takes months or even years, but don't bother or rush, just continue your journey. It really pays off in the long run.

[1]: well, I am on a "coding spree" right now so I am doing many changes, most to refactor some things that I wasn't happy before; but before this coding spree my configuration didn't change significantly for almost a year.

[2]: what I call having to compile C/C++ libraries in an another language like Python (giving it an example here, almost any language has a similar mechanism since C/C++ ecosystem is huge), that generally needs to dynamically link with whatever you have in your system installed. This is possible on Nix/NixOS, and easy once you know what you're doing, but it is different from anything else so it does trip newbies.

[3]: if you're interested on this approach, I used this guide when started: https://forum.level1techs.com/t/nixos-vfio-pcie-passthrough/.... To get it fully reproducible it though, there is no way on NixOS itself yet, however there is a good guide here: https://nixos.wiki/wiki/NixOps/Virtualization#Setting_Up_the...

Re: Nix-GUI: Make NixOS usable for non-technical users through settings / GUI

#80

A lot of odd Nix hate in here, or at least extreme dislike. NixOS is so very usable. There are a lot of foot-guns but that's true of Linux systems. It takes some time to get comfortable with all the different ways to configure stuff. There's a new language, a new build system, a new Linux distribution. I've spent very little time relative to say, figuring out dpkg or systemd, or learning Bash or C or Perl, or learnin…

Nix(OS) purely with Flakes i.e. without channels is so f good that I'm not using it just as my daily driver on a PC and to package software and create development environments...

I also replaced Buildroot with it for building embedded images for SBCs. Lifechanging experience.

Post reply on HN