website icon indicating copy to clipboard operation
website copied to clipboard

nix-package-manager/

Open utterances-bot opened this issue 2 years ago • 18 comments

Nix Package Manager

Having Fun with Technology

https://christitus.com/nix-package-manager/

utterances-bot avatar Aug 23 '22 08:08 utterances-bot

Good Review I couldn't get to install it on ubuntu though, blimey

There is no uninstall option, so had to manually delete all .dot files

GrubBox avatar Aug 23 '22 08:08 GrubBox

I was and still am really impressed by Nix. Installation of the package manager is very fast, same with installation of the packages themselves. The only issue I have is that some packages do not work properly. Specific examples would be Citra not launching at all, and Freetube's sound not working. Not a big deal breaker since there are many more ways of installing software tho.

Tsu-gu avatar Aug 23 '22 10:08 Tsu-gu

I've been using it recently and it's quite amazing tbh! Thanks for video

that404nerd avatar Aug 23 '22 16:08 that404nerd

Now the next task. Try to uninstall the nix from your OS :)

kha84 avatar Aug 23 '22 19:08 kha84

It's quite good, but on fedora you can't install easily the multi-user mode. You even have to turn off selinux...

BRDB82 avatar Aug 24 '22 19:08 BRDB82

Well I managed to install NIX on Fedora 36, but indeed had to turn off selinux. Tried to trace where it blocks, even commented out the selinux_check in the script. It manages to install but still can't run the daemon due to SeLinux, even after trying some code to allow it in SeLinux. Annoying part is, I can't run any of the installed programs. I even wrote a little script to trace the .desktop files in /nix/store and put those in an array. Reading them one by and see if they're not in a folder (which I created in ~/.nix-apps), if they're not, the script copies the new file(s) to that folder and to ~/.local/share/aplications. Unfortunatly, the apps still don't show up in my applications. So Chris, if you're up to it to look into it, and contact me if you'd need the little script.

BRDB82 avatar Aug 26 '22 16:08 BRDB82

Good new, I managed to get the apps to show up in my applications menu.

BRDB82 avatar Aug 27 '22 19:08 BRDB82

I can get apps to show up on menu thanks to this but now they won't launch. I assume I need to add something to my path, but I don't see any mention of this above, and the documentation for this, while extensive, is extensive in part because it's cumbersome and not intuitive at all. I've used emerge, apt, dnf, pacman, pamac/yay, and this one is just strange. I thought pacman was weird compared to apt for a bit but this is definitely odder.

korodarn avatar Aug 29 '22 03:08 korodarn

I was able to figure out how to get app to run adding ~/.nix-profile/bin to path in .bashrc but for whatever reason even after logging out and back-in kde had to have a manual edit to the shortcut (which required me to add rw writes to /nix/store) to point to that same location and the shortcut doesn't have an icon. I like the concept of this tool but it's got a ways to go.

korodarn avatar Aug 29 '22 03:08 korodarn

Hi i am wondring how you can install packages like docker which require to be in the system.d directory.

i will be glad if someone can help with this.

using nix-env for install

bhaniel avatar Sep 16 '22 22:09 bhaniel

There are simple installers that can help with installing on Fedora and should also make process of uninstalling easier - https://github.com/nix-community/nix-installers

Currently, this is only method I found for multi-user install on Fedora that doesn't require disabling SElinux entirely

jilinoleg avatar Oct 09 '22 08:10 jilinoleg

I managed to create links only by this (For Kubuntu 22.04), otherwise notification of not authorized to execute appeared):

export XDG_DATA_DIRS=~/.local/share/:~/.nix-profile/share:/usr/share cp -f ~/.nix-profile/share/applications/*.desktop ~/.local/share/applications/

Thx to knedlsepp in https://stackoverflow.com/questions/33872937/package-installed-by-nix-not-in-mate-desktop-menu/46666543

DREU007 avatar Nov 30 '22 07:11 DREU007

I can second DREU007's comment about exporting the data_dir. Not only does it seem semantically better, because it tells the system to treat that share-folder as it would a share-folder, it also prevents issues. Aside from .desktops not finding their icons, I had everything using openGL (or by extension Qt) fail to initialize without the export. I recommend ".profile" instead of bashrc though, since these should only run once per session, not per terminal. Any previously made softlinks need to be removed for this to work properly.

Nix may be kinda invasive with it's shell modifications and worker users and may need some tinkering to integrate right, but it beats random home:-repos any day. Cheers

ChaosNicro avatar Feb 18 '23 22:02 ChaosNicro

On Fedora + Gnome, GUI apps still don't work, even though they do appear on the Application menu, with the ln command Chris gave.

bshor avatar Mar 11 '23 03:03 bshor

On Fedora + Gnome, GUI apps still don't work, even though they do appear on the Application menu, with the ln command Chris gave.

Have you linked the nix-profile into your system properly? Opengl and such break fast if the right so is not found. Try exporting xdg_data_dirs like above, though make sure to add onto the existing variable, not blindly overwriting it. There is also nixGL as a bandaid-fix.

Also this:

There are simple installers that can help with installing on Fedora and should also make process of uninstalling easier - https://github.com/nix-community/nix-installers

Currently, this is only method I found for multi-user install on Fedora that doesn't require disabling SElinux entirely

ChaosNicro avatar Mar 12 '23 08:03 ChaosNicro

Try running nix-env -qa [package name] for an easy search at the terminal! Takes a little longer than I would hope but works well.

ddanon avatar May 18 '23 00:05 ddanon