/nix/ - General discussion

Why is no one using the best Unix distro?
>> nixos.org

Attached: nixos.png (241x209, 5K)

Other urls found in this thread:

hydra.nixos.org/project/gnu
gnu.org/software/guix/manual/en/html_node/Using-the-Configuration-System.html#Using-the-Configuration-System
paste.debian.net/hidden/cd7ad626
twitter.com/NSFWRedditGif

>systemd
>gnu
into le trash

Tried installing GuixSD but apparently its a source based distro, which I found out after reading through their mailing list to see what the fuck is going on with my vm installation. Even using a bare-bones configuration file resulted in maxing out my memory and grinding my hdd with constant swapping. I thought they had binaries since they claim they have build-farms but only a handful of packages was substituted, the rest had to be build.

Is Nix any different or is it too a gentoo clusterfuck?
>inb4 get a better pc
I'm not going to waste hundreds of dollars for a meme distro.

Attached: trash.jpg (160x105, 5K)

They do have binaries. For me even a bigger configuration didn't give me any build processes and used substitutes for everything but obviously the nonfree kernel which you always build from source

>Why is no one using the best Unix distro?
Using a declarative language to configure your system is their approach to solve config hell.
But I feel like configuration isn't even that big of a problem on other systems to begin with.

I like that they use Scheme but I need nonfree shit. How plausible is installation on 2 years old laptop?

What do you mean how plausible is the installation on a 2 years old laptop?

I have an older laptop with an Intel Wifi controller which means I am using the nonfree kernel with linux-firmware blobs. Works perfectly fine

If you're talking about nonfree user software I am not sure if GuixSD is the greatest of choices unless you take a few hours to read through the packaging documentation and package the software you need yourself. Packaging isn't that difficult for Guix

cont. because I forgot to mention that RPM is in the Guix repo already, so you could also install RPM and use RPM packages, but that kind of defeats Guix' purpose a little bit, but should work fine though

Thanks for detailed answer. The nonfree kernel you have to install yourself as it's not in their repos? Also I think situation is the same for programs? I would rather use Guix than Nixos just because of Scheme, Nixlang looks like shit to me.
So how do you keep entire distro updated? Write your own script for nonfree?
Didn't know that, but agreed it beats the purpose.

>The nonfree kernel you have to install yourself as it's not in their repos?
Yes, this is done by defining the package in the config.scm. If you want I can give you a paste to my config, which is on linux 4.17.8 with a recent linux-firmware version, a few days old.

>So how do you keep entire distro updated?
running these:
guix pull // updates local guix repo
guix package -u //updates all of your installed packages in your per-user profile
guix system reconfigure yourconfig.scm //rebuilds the system profile

>Write your own script for nonfree?
The only thing you need to do by yourself is changing the kernel version string, and update the sha256 hash for the package (you just download the kernel file and use guix hash thefile.tar.xz and copy paste the output into the config)

For the linux-firmware package you basically do the same but git clone the linux-firmware repo and then run the same guix hash fuction on the cloned repo, paste rhe output and the commit number you used into the config

I copied the bare-bones config into my mounted partition. When I did --dry-run it showed that only 5 packages would be downloaded as binaries and everything else would have to be build. What did I do wrong? I followed the installation manual step by step. Is my pc simply too weak? I tried installing it on a 512mb ram vm on a single-core amd athlon host.

Please post link to your config I would be very grateful.
And thanks for clarification, it looks fairly straightforward.

Now, I have one more question. How do you change certain config files if you can't change them directly? Things like samba, qemu... Sorry I didn't check anything about it in a while and you sparked my interest again.
Also is there active IRC or something, where I can ask more if I get stuck?

Did you actually run guix system reconfigure without --fry-run then?

I never had this problem. Did you try it again at another time? There are substitutes for every package that successfully builds on Hydra.

You can look at the Hydra jobs here:
hydra.nixos.org/project/gnu

Actually look at the packages though, don't just pay attention to the red crosses, this shows as soon as the package fails for a single architecture. The site fucks up sometimes (especially the search fuction) but generally it should give you an idea of which packages should have substitutes, and if it fails to build you can also look at the raw build logs to debug.

It was my first install, I did
guix system init /mnt/etc/bare-bones-config.scm /mnt
and it kept compiling for hours with guilec. The configuration I took was from
gnu.org/software/guix/manual/en/html_node/Using-the-Configuration-System.html#Using-the-Configuration-System
It's not that I got an error or anything, I'm just discouraged because I didn't know GuixSD was primarily a source-based os, which I don't like because of the compile times. I will try running Guix on my existing arch installation, and try installing packages which have pre-built binaries.

Forgot to add I used the first "bare-bones" config for my vm.

My config: paste.debian.net/hidden/cd7ad626

You only need the upper parts, and the kernel option in your operating system part. The packages and services I have on the bottom are mainly for testing purposes right now. Tried GDM, but GDM fucks up for some reason. SDDM and SLiM (the default DM) work

It really depends on what you want to do, Im not really familiar with qemu and samba

There is an IRC (#guix on freenode), albeit not a huge one. Generally has around 180-200 users online at almost all times. You usually find a guy or a few guys who can help you. Everyone I've talked to there was really friendly.

>It's not that I got an error or anything, I'm just discouraged because I didn't know GuixSD was primarily a source-based os
It really shouldn't be. It uses Hydra to build the packages, just like Nix. I think there are plans for eventually replacing Hydra with a different buildfarm, things might go better then, but I have no idea when this is coming. If you have to build something from source it is because of this:

>The package got updated and Hydra didn't build it yet
>The package is fucked (very rare, but for example lyx is fucked right now, building from source then also fails for you)
>Hydra fucks up for an unknown reason, rare

When I see that it starts compiling with a new system config, I usually cancel the reconfigure and let it work overnight later on. Happens but it happens rarely.

YOU DON'T NEED A THREAD FOR ONE FUCKING DISTRO.
GO TO /fglt/
A THREAD FUCKING DIED FOR THIS. STOP BEING ATROCIOUS.

>Is Nix any different or is it too a gentoo clusterfuck?
There're more people using it, so more developed, more packages and more updated. Also no full-free requirement. Configuration will be headache though if you've never used a functional language before, but a Haskeller will love it, but even then following the guide will get you a usable system.

Thanks a lot user.

Btw, samba and qemu were just examples but question can be for any program or service that use a bit more complex config or few of them. If you can't change the file directly you should have ability to set it in config?

Last time I checked, I couldn't find an answer in documentation. Is it possible to control installed programs for users with main config?

Thanks for explaining. I hope it was just bad luck, I'm not scrapping my vm yet. Will check the hydra next time and maybe wait a little.

>unix distros
You're a retard

I think the system config is user-independent, so I guess its not possible. If in doubt you can always ask on the IRC, there are guys with a lot more knowledge, and Ludovic Cortes (the creator, on irc hes civodul) is also there a whole lot and is friendly.

Also, most configs should be present either as dotfiles in ~ (your home dir) or in /var/guix/profiles/your_current_system_profile or in /var/guix/profiles/per-user/your_user/your_current_user_profile

The stuff you usually have in /usr/share should be in these dirs if you really need to change them

The package manager Nix does better what Flatpak et al attempt while being a decade older. And it can already be used on OS X and FreeBSD.
Also, Nix isn't only a package manager but also a build tool about which you've got Hydra a continuous integration system.
Moreover NixOps does better what Puppet et al attempt while being older.
NixOS was the future before it was imagined.

Good stuff m8, would buy you a beer.
Fucking refreshing after millions of consumer war threads.

M8 I have enough beer here, note the timezone in the config :^)

I don't see the significant impact of this on my daily use. I like the idea behind it, but I don't think that is a problem for me at the moment. Managing the package side is often done """well""" by maintainers anyway.

Also, a stupid question is, how are shared library packages handled? Are they not tracked by a package manager?

Install GuixSD.

Attached: 1530484003478.png (1422x1275, 205K)

Heh, missed that part. But there is no such a thing as enough beer. Cheers

>how are shared library packages handled?
Should be version dependent in both nix and Guix. Meaning that if 3 packages need 1.1 of lib A and 2 need 1.3 of lib B and 1 needs 1.5 of lib B there should be libA-1.1, libB-1.3 and libB-1.5 installed once each

>If you can't change the file directly you should have ability to set it in config?
In NixOS (so I guess similar applies to GuixSD), a package which can have complex text file should have the option of inputting/appending (or sourcing a file) text as option in configuration. For example in my configuration.nix I have
networking = {
...
nftables = {
enable = true;
rulesetFile = ./files/firewall.nft;
};
...
};

and
services = {
udev = {
...
extraRules =
''
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
'';
};
...
};

The first example sets a file whereas the second appends text. Everything under /etc though is directly accessible with
environment.etc.'filename'.*

Yes, the same should be possible for Guix

Nix is also considered "source based" but without the autism. Most upstream vanilla packages will have a binary cache. You may have to compile for bleeding edge or for certain features.