3 ms·
There needs to be two levels of configuration. One is just straight up a config file and the other is the nix language. Average users should not need to ever
by corethree 3y ago
There needs to be two levels of configuration.
One is just straight up a config file and the other is the nix language.
Average users should not need to ever touch the nix language. They should only touch a config file.
This config file needs to be so simple that it Can be configured with a GUI. Isomorphic configs when run with a formatter should come out identical. What I mean by this is if you have a machine with say version 3.123 of an app installed there is only one possible config file that can describe this configuration. There shouldn't be 50 possible ways to program that same configuration.
- Niksko 3y agoIt's not quite the same, but Home Manager feels a little like what you're describing.
- Cyph0n 3y agoThis is exactly the goal behind NixOS the Linux distro (the worst part about Nix is the naming!). The distro itself and module authors give you high-level building blocks that allow you to configure the system declaratively (e.g., create users) as well as install & configure software. Of course, you still need to write Nix to use these options and modules. But if you take a NixOS configuration and apply it on a different machine, it should do exactly the same thing (modulo hardware-specific config options). I am a relatively recent NixOS convert and I quickly decided that I will be using it exclusively on my personal servers going forward. I even wrote a tool that simplifies migrating Docker Compose stacks to NixOS: https://github.com/aksiksi/compose2nix https://github.com/aksiksi/compose2nix
- corethree 3y agoNo. Because the nix language is an actual programming language you can have hundreds or millions of programs that can be interpreted into identical configurations. It makes it so that these configuration files can get unreadable. I worked at a company where ALL development happened on a nixos development configuration that was shared by the entire company. So all developers were developing on essentially the same configuration as the deployment machine. But the nix stuff started getting unwieldy and complicated. Just adding a freaking package was a programming chore. The only way it worked was because this company was big enough to have a team dedicated to NixOS. Right an entire team just managing NixOS and this is NOT the team that runs dev ops of ops in general. That's how complicated it is. Anyway the fact that you have to program the configuration makes it hard to use, it makes it hard to build a GUI around the configuration. Imagine you're playing a video game and the video game required you to write python code to configure it. That would be a dumb design. The python code could be for modding it, that makes sense but you still need a configuration layer that's much more declarative and dumb. You can have this dumb layer STILL have all the properties of Nix. And you can still have the nix language underneath the dumb configuration layer for users who want to create packages and stuff like that. If the nix developers worked on this and got GUI up, I'm telling you user adoption will sky rocket. Suddenly you'll get more casual users willing to use it as their daily driver OS. And you'll get more advanced users too because these casual users are more easily converted to advanced users due to the more gradual learning curve.
- gipp 3y agoThis is completely trivial to do in Nix now. Whoever's writing the nix can just expose "simple" config as a JSON file and use those values whatever.
- corethree 3y agoIt needs to be made a standard and enforced programmatically. If thousands of users aren't following it, what's the point? Now the OS has to cater to the requirements of all those users.
- gipp 3y agoHaving a standardized system for that only makes Nix more complicated, not less. Now you have two parallel configuration systems to worry about. And the "simple" one will inevitably accrue more and more features to address its lack of flexibility. That's like the first law of config languages. Now you inexplicably have two parallel configuration systems to do one thing
- corethree 3y agoIt exists for all software that has configuration and has a plugin system. Think games. If I'm playing a game and I want to change the configuration to easy mode and up the resolution to wide screen I need to write a program or script to do it? No it should be a dumb setting configurable via gui. If I want to modify a game beyond the dumb config or modify the config itself then scripts make sense. It's called mods. In games and in software with plugins, configs and scripts live side by side. It's one of the most common patterns in the world. Additionally you're not seeing what I'm proposing here. All configs and packages have to go through the "dumb" system. There is zero alternative. This is exactly what games do. If you want to modify the configs then you go through the modding system. This can use the nix language. Either way as it exists right now nix can't have a GUI for its config. If I make changes on a GUI how does the program know how to modify your config file which is a custom script that you could of wrote in a thousand different ways? It can't. You want a GUI, you need a dumb config, end of story. Unless you want nix stuck in the niche group of power users you need a GUI.
- __MatrixMan__ 3y agoI disagree. I've been a linux user for 20 years now and for the first 18 I never fixed a package. I've been a NixOS user for 2 years and suddenly I'm a participant. Having a common language removes a lot of barriers that otherwise prevent people from contributing. As for the language itself it's... fine. Most alternatives that get proposed don't have anything like a recursive attribute set, which is something that matches the problem domain very well.
- corethree 3y ago>I disagree. I've been a linux user for 20 years now and for the first 18 I never fixed a package. I've been a NixOS user for 2 years and suddenly I'm a participant. That's the problem. Most people and developers don't want to be a "participant". They need something that gets the job done. Your disagreement represents a niche and if the devs cater to your disagreement then they cater to a small niche. The best design caters to both the average more casual user and the more advanced user. Many developers want a computer that just works so they can concentrate on development, that's why most developers own macs even though linux is the most hacker friendly OS. NixOS especially forces users to "participate" in in-depth OS configuration which is not desired by the majority. People in the linux world need to be empathetic with the more common user otherwise their part of the world will remain niche and closed source operating systems like windows will be leaps and bounds ahead of linux in terms of usability and user friendliness. Linux has made lots of strides in the last decade, but for user friendliness? It has ALSO made big strides here. But not NixOS. NixOS is a step backwards for the average user and a step forward for someone like you or me who's willing to learn a completely new programming language to use an operating system. I'm a functional programmer so ML style languages like Nix are trivial to me and easy to learn and easy to understand. But this ability doesn't make me blind and lose empathy for the average user and even the average developer who doesn't like haskell or ML. More OSS people need to understand this. My comment here wasn't about what I wanted. When I used NixOS everything was just fine. I had no problems with it from the standpoint you describe as a personal OS. But I was still able to identifiy the problem with NixOS as a consumer product or even as a product used at a company for development. This isn't a trivial problem. It's a major impediment that hinders adoption.