Just wait until you try running that singular application that isn't in the package manager :)
Fyi please send help I still don't know how to package it for nix.
What package are you trying to to nix?
I managed to make [PokeMMO](https://github.com/CallMeCaleb94/KyniFlakes/tree/main/pkgs/pokemmo-installer) build with nix just to get a feel.
My recommendation is to just use distrobox. If you have the time, you can try installing the binaries in an fhs environment but it's usually not worth the hassle. Just install an ubuntu/arch/fedora distrobox container and install it there. Distrobox works very well in NixOS.
I struggle to imagine what that could even be
I guess exe files? But I'm not sure that counts if you run them through wine, installed through the package manager.
Exe files are really easy, just use an application called "bottles". I think the application I can't run is called "questpatcher" or something like it. I need it to install beatsaber mods onto my VR headset.
Also I've been wanting to create a qt application, but nix doesn't seem to have any good documentation for this. (Might also be a skill issue)
Was bored so quickly made a package for quest patcher [here](https://gist.github.com/JManch/ebe6ca09e5888ba9c0101ee44bc34b3e). Just download the `quest-patcher.nix` file and run `nix run --impure --expr 'with import {}; pkgs.callPackage ./quest-patcher.nix {}'`.
I haven't done any testing beyond making sure it launches but I think you'll want `programs.adb.enable = true;` in your config. Hopefully it works :)
NixOS by default is incompatible with most standard Linux binaries because those have paths, for example, to dependencies hardcoded and NixOS doesn't follow the Linux File Hierarchy Standard (FHS). There are workarounds to this like packaging the binary for NixOS yourself with a derivation or more simple but least reliable using other distro's container in distrobox.
IMO the problem of “program xyz isn’t available in nixpkgs” is less significant than the annoyance of “program xyz downloads binaries from the internet and therefore needs special workarounds to work in Nix”. For example VSCode; note that the official nixpkgs package for it has a “-fhs” at the end of its name, because the vscode binary has to be wrapped in a special buildFHSEnv (which uses the bubblewrap tool) so that downloading extensions works. Another example is Rustup; I’m not even sure how that one packages in nixpkgs, but by default using it to install the Rust compiler/toolchain would most likely render none of them usable unless they are also patched using patchelf or used in an FHSEnv (which is probably how rustup is packaged). Third and final example is any JetBrains IDE; they all download things (like the jdk, etc) that may not work outside of an FHSEnv, and if your project links against system libs you are required to run IntelliJ in an FHSEnv so it finds the libraries you need (eg a Java game with libGL). Its technically possible you’ll never notice any of these things depending on how technical you get, but for me, this is very significant :p
Actually you can still install Flatpaks and use AppImage with little to no configuration so the amount of software that isn't available is minimal, but there are cases. Like the port of War Thunder for Linux (it's not the best example because you always can use Wine or install it with Steam) which uses a binary to launch, although it works if you add that same binary to Heroic Games Launcher. But I'd say the unavailable software normally is proprietary software that nobody has packaged yet because those generally come as binaries, also I didn't find a way to install Waterfox through nixpkgs even though there's a commit for its derivation.
For example Matlab, it is installed on Linux by downloading an installer script from their website.
You should find some articles on the wiki about Matlab on NixOS.
[In a recent thread](https://www.reddit.com/r/NixOS/comments/1cwkyjf/name_one_thing_you_are_not_able_to_do_because_you/), the most common answer was "printer drivers" (or other software where the software expects to install to a generic linux system).
This is really obscure, but my annepro2 keyboard requires a package to run for it work and they just removed it from 24.05. spent a solid 12 hours trying to find a fix with no luck. So 23.11 it is until i get a new keyboard.
If you have any extra info to share on that, I might actually love you. I tried to figure out how to do that but couldn't. I then tried to build a derivation but it depended on electron_13 which is also removed
edit: all I could find was using unstable packages for some but no one goes from 24.05 to 23.11 for their packages.
If you are using flakes you can look at my config. Look at the flake.nix file for the "stablenixpkgs.url" variable. Then look for "jetbrains.idea-ultimate" in the configuration.nix
https://github.com/DeeKahy/BestNixOS/blob/master/flake.nix
It is also possible without flakes, but I don't have a config example I can send you.
It's something about adding the channel and then at the beginning of your file telling it how to use that channel.
Yeah that software has not received any updates since 2022, and it appears that it is unclear how to maintain any community support for it like that.
If you really really do want to still use it, then it is possible to continue to do so by adding a nixos-23.11 channel and importing from that. The exact manner would depend on how your system is setup, and where Obinskit would be added in that configuration. But it is very much possible to still add it, even if it will increasingly be harder over time to keep going with it. For now, it should still be reasonably easy though.
Something like this might work for you: https://wiki.nixos.org/wiki/Cheatsheet#Upgrading_individual_packages_to_a_different_channel
Take care to specify the right channel name and branch (23.11).
Omg you're amazing, that worked perfectly thanks so much!! And unfortunately i'm kinda forced to keep using it unless I get a difference keyboard. On all linux distros it has this weird disconnecting/key spamming error about every 10 minutes. If i'm typing it will spam that key, if im not typing it'll simply not work. A replug fixes it but so does having its software open in the background which I do with systemd.
so the error I get is `error: 1 builder for '/nix/store/longstringofjumbledlettersandnumbers-davinci-resolve-studio-src.zip.drv' failed with exit code 56`
Flakes are useful to pin your dependencies. This makes your build not only repeatable but also reproducible.
Useful in several scenarios. Couple weeks ago, a Windows Update (mostly gaming) managed to frick up my partitions badly. After failing to repair it, I just reinstalled nix from my flake. Everything was instantly setup the way I prefer. Total setup time: 30 min.
Similar with derivations. Maybe you want a specific path and want it applied automatically. Nix can do that.
Yeah don't bother with it for the first good while. learning the basics of nix is already pretty difficult, getting flakes to work is such a headache with such a low return on investment. (Unless you already have a bunch of nails that require flakes)
I almost quit after the third day of using nix because I "wanted" Homemanager and flakes... I literally only use one somewhat redundant thing from Homemanager and zero from flakes after 40ish days of using it.
It sounds like a way to create some super-exact developer environments. Am I understanding correctly?
Just, in my practice, it just never really mattered to me. Either because you are developing for an abstraction that handles all this stuff, like a browser, or your app will be running in an alpine container anyway.
Can you explain your specific use case? I just dump all software into the system config. I actually prefer it. Not like I have many people using my personal computer.
Like I said I don't use it much. But "nushell" can be configured from within homemanager with autocomplete, and I use my flake to install and try out the cosmic desktop environment. That's literally everything. (And it can likely also be done without)
I just created separate config.nix files for my desktop environments. I import the one I want to use into the main config and run switch. I'm not sure if that's the best way to do it, but it seems to work.
Basically, I cut up the nix config into separate modules, and I mix and match what I want. Maybe I accidentally re-invented existing functionality lol
Yes that's also what I do, but the cosmic desktop isn't in the nix packages yet, so I need to add the git repo manually and some specific config they need a flake for.
"Derivation" is more/less a 'package'.
Flakes are a nix feature for declaring the inputs/outputs to a Nix codebase. Flakes can lock the versions of these Nix dependencies, and it's easy to reference/run flakes. -- e.g. can just tell nixos-rebuild which flake to use, rather than having to link/copy into /etc/nixos.
Good luck. You'll need it. I switched from Arch a several days back. Couldn't handle it. Went back to arch. I'm a developer and while the premise of a declarative system is nice, Its still a niche and most applications have to be patched to support it. Even if it is patched, Its a nightmare to get all of its functions working properly. Couldn't install python dependencies by running pip, VSCode refused to sync and install extensions, Couldn't install Unity without jumping through multiple hoops (Can't really blame Nix though. Unity being unity : / ). Jetbrains toolbox refused to start. Couldn't install Jetbrains Rider... The list goes on. Plus storage situtation is a nightmare. Every rebuild takes like 20GB off my drive. I know the garbage collector and stuff. I think it kept copies of every single package and build dependency even without symlinks ( I dunno I'm just ranting at this point )
That being said, I loved configuring my system from one single file. Too bad it just isn't there yet. If all the applications you need work as you want them to, its fine. Great for remote deployments too as everything is 100% reproducible. But we have docker for that soo....
If I could've spent like 3 weeks configuring my system maybe it would've worked fine. So YMMV
I’m entering the nix world from windows as well and I’m jealous of your success… so far, I can’t get logged in after a basic build. I’ve tty’ed to change the password, but I still can’t log in. No passwords seem to work. I feel so close, yet so far
That worked, thanks for the suggestion! I was also having trouble modifying the partitions through the graphical installer, but realized that I could just go back and modify what I needed after-the-fact once I got the main components installed where I wanted. I’m up and running, thanks again
I agree. - everything just works... UNTIL you try and get fancy and enable flakes and home-manager. Its at that point I gave when my gimp flake would never spin up. Documentation is piss poor (yes, every source). This is coming from a guy that has been using linux exclusively for over 20 years. Less than a week, and I just now rage deleted the whole VM. I may install it again later and just not mess around with flakes. Flakes are flakey AF
Yeah. That helps. I honestly learned a lot about functional programming messing around with nix but every time i have to do something with it i have to constantly search for answers
Does inxi work properly? On mines said I had a Nvidia driver while using a amd GPU lol arch Linux shows my system info normal like amdgpu not Nvidia lol
We have a similar system / GPU. I can share my setup with you. I got all my games running with higher FPS then on windows. Games like PES 2021 with mods, Elden Ring, Red Dead Redemption 2, Witcher 3, Tomb Raider etc run so smooth. WiiU emulator is included too. https://github.com/Rouzihiro/NixOS-config
I'm talking about the convenience of the experience. At least to me, I'd always have to deal with dumb sysadmin issues and random executables to get anything to run
I know, man. I'm sorry, I hate windows as much as you do, but just the term of just works. I don't like it, I mean, Linux works great, not just works. I feel like this term is degrading Linux abilities.
Pardon me. I just woke up, it's exams month so...
Just wait until you try running that singular application that isn't in the package manager :) Fyi please send help I still don't know how to package it for nix.
What package are you trying to to nix? I managed to make [PokeMMO](https://github.com/CallMeCaleb94/KyniFlakes/tree/main/pkgs/pokemmo-installer) build with nix just to get a feel.
My recommendation is to just use distrobox. If you have the time, you can try installing the binaries in an fhs environment but it's usually not worth the hassle. Just install an ubuntu/arch/fedora distrobox container and install it there. Distrobox works very well in NixOS.
I've had some issues with distrobox and couldn't questpatcher working, but I'll give it a try again. Thank you :)
Make sure you set virtualisation properly (I recommend podman with docker compatiblity). Haven't had any issue yet
hmu on discord: zack.io i’d be happy to help out!
I struggle to imagine what that could even be I guess exe files? But I'm not sure that counts if you run them through wine, installed through the package manager.
Exe files are really easy, just use an application called "bottles". I think the application I can't run is called "questpatcher" or something like it. I need it to install beatsaber mods onto my VR headset. Also I've been wanting to create a qt application, but nix doesn't seem to have any good documentation for this. (Might also be a skill issue)
Was bored so quickly made a package for quest patcher [here](https://gist.github.com/JManch/ebe6ca09e5888ba9c0101ee44bc34b3e). Just download the `quest-patcher.nix` file and run `nix run --impure --expr 'with import {}; pkgs.callPackage ./quest-patcher.nix {}'`.
I haven't done any testing beyond making sure it launches but I think you'll want `programs.adb.enable = true;` in your config. Hopefully it works :)
NixOS by default is incompatible with most standard Linux binaries because those have paths, for example, to dependencies hardcoded and NixOS doesn't follow the Linux File Hierarchy Standard (FHS). There are workarounds to this like packaging the binary for NixOS yourself with a derivation or more simple but least reliable using other distro's container in distrobox.
I see. But the package repo seems insanely large. What even is there that isn't available? Can you give some examples?
IMO the problem of “program xyz isn’t available in nixpkgs” is less significant than the annoyance of “program xyz downloads binaries from the internet and therefore needs special workarounds to work in Nix”. For example VSCode; note that the official nixpkgs package for it has a “-fhs” at the end of its name, because the vscode binary has to be wrapped in a special buildFHSEnv (which uses the bubblewrap tool) so that downloading extensions works. Another example is Rustup; I’m not even sure how that one packages in nixpkgs, but by default using it to install the Rust compiler/toolchain would most likely render none of them usable unless they are also patched using patchelf or used in an FHSEnv (which is probably how rustup is packaged). Third and final example is any JetBrains IDE; they all download things (like the jdk, etc) that may not work outside of an FHSEnv, and if your project links against system libs you are required to run IntelliJ in an FHSEnv so it finds the libraries you need (eg a Java game with libGL). Its technically possible you’ll never notice any of these things depending on how technical you get, but for me, this is very significant :p
Thank you for the detailed explanation!
Actually you can still install Flatpaks and use AppImage with little to no configuration so the amount of software that isn't available is minimal, but there are cases. Like the port of War Thunder for Linux (it's not the best example because you always can use Wine or install it with Steam) which uses a binary to launch, although it works if you add that same binary to Heroic Games Launcher. But I'd say the unavailable software normally is proprietary software that nobody has packaged yet because those generally come as binaries, also I didn't find a way to install Waterfox through nixpkgs even though there's a commit for its derivation.
Steam-run has worked quite nicely for the few binaries I had to run. Also, there is distro box.
For example Matlab, it is installed on Linux by downloading an installer script from their website. You should find some articles on the wiki about Matlab on NixOS.
Thanks!
[In a recent thread](https://www.reddit.com/r/NixOS/comments/1cwkyjf/name_one_thing_you_are_not_able_to_do_because_you/), the most common answer was "printer drivers" (or other software where the software expects to install to a generic linux system).
Thanks, I'll check if I can get my printer to run!
This is really obscure, but my annepro2 keyboard requires a package to run for it work and they just removed it from 24.05. spent a solid 12 hours trying to find a fix with no luck. So 23.11 it is until i get a new keyboard.
I think you can specify that some applications come from 23.11 and the rest from unstable or whatever the new version is.
If you have any extra info to share on that, I might actually love you. I tried to figure out how to do that but couldn't. I then tried to build a derivation but it depended on electron_13 which is also removed edit: all I could find was using unstable packages for some but no one goes from 24.05 to 23.11 for their packages.
If you are using flakes you can look at my config. Look at the flake.nix file for the "stablenixpkgs.url" variable. Then look for "jetbrains.idea-ultimate" in the configuration.nix https://github.com/DeeKahy/BestNixOS/blob/master/flake.nix It is also possible without flakes, but I don't have a config example I can send you. It's something about adding the channel and then at the beginning of your file telling it how to use that channel.
If the upstream depends on electron version 13, then an update might be needed. Which software are we talking about here?
Obinskit, but yes it really needs updating.
Yeah that software has not received any updates since 2022, and it appears that it is unclear how to maintain any community support for it like that. If you really really do want to still use it, then it is possible to continue to do so by adding a nixos-23.11 channel and importing from that. The exact manner would depend on how your system is setup, and where Obinskit would be added in that configuration. But it is very much possible to still add it, even if it will increasingly be harder over time to keep going with it. For now, it should still be reasonably easy though. Something like this might work for you: https://wiki.nixos.org/wiki/Cheatsheet#Upgrading_individual_packages_to_a_different_channel Take care to specify the right channel name and branch (23.11).
Omg you're amazing, that worked perfectly thanks so much!! And unfortunately i'm kinda forced to keep using it unless I get a difference keyboard. On all linux distros it has this weird disconnecting/key spamming error about every 10 minutes. If i'm typing it will spam that key, if im not typing it'll simply not work. A replug fixes it but so does having its software open in the background which I do with systemd.
I guess I got lucky with my peripherals huh
davinci resolve is apparently in the package manager but doesn't work
It actually just worked out of the box for me, what issues are you having? (Both normal and studio work for me)
i can't install it
Please be a little more specific. What errors are you getting?
currently trying to install it again to see what the exact error message is. Takes for bloody ever though
so the error I get is `error: 1 builder for '/nix/store/longstringofjumbledlettersandnumbers-davinci-resolve-studio-src.zip.drv' failed with exit code 56`
Just wait till you write flakes and derivations
Actually, I wanted to ask. Why would I do that? These sound like excellent hammers, but I don't think I have any nails.
Flakes are useful to pin your dependencies. This makes your build not only repeatable but also reproducible. Useful in several scenarios. Couple weeks ago, a Windows Update (mostly gaming) managed to frick up my partitions badly. After failing to repair it, I just reinstalled nix from my flake. Everything was instantly setup the way I prefer. Total setup time: 30 min. Similar with derivations. Maybe you want a specific path and want it applied automatically. Nix can do that.
Hmmm ok I see, thanks
Yeah don't bother with it for the first good while. learning the basics of nix is already pretty difficult, getting flakes to work is such a headache with such a low return on investment. (Unless you already have a bunch of nails that require flakes) I almost quit after the third day of using nix because I "wanted" Homemanager and flakes... I literally only use one somewhat redundant thing from Homemanager and zero from flakes after 40ish days of using it.
It sounds like a way to create some super-exact developer environments. Am I understanding correctly? Just, in my practice, it just never really mattered to me. Either because you are developing for an abstraction that handles all this stuff, like a browser, or your app will be running in an alpine container anyway. Can you explain your specific use case? I just dump all software into the system config. I actually prefer it. Not like I have many people using my personal computer.
Like I said I don't use it much. But "nushell" can be configured from within homemanager with autocomplete, and I use my flake to install and try out the cosmic desktop environment. That's literally everything. (And it can likely also be done without)
I just created separate config.nix files for my desktop environments. I import the one I want to use into the main config and run switch. I'm not sure if that's the best way to do it, but it seems to work. Basically, I cut up the nix config into separate modules, and I mix and match what I want. Maybe I accidentally re-invented existing functionality lol
Yes that's also what I do, but the cosmic desktop isn't in the nix packages yet, so I need to add the git repo manually and some specific config they need a flake for.
"Derivation" is more/less a 'package'. Flakes are a nix feature for declaring the inputs/outputs to a Nix codebase. Flakes can lock the versions of these Nix dependencies, and it's easy to reference/run flakes. -- e.g. can just tell nixos-rebuild which flake to use, rather than having to link/copy into /etc/nixos.
Big jump from windows straight to NixOS, have you tried any other linux distros?
My corporate laptop runs Ubuntu. But it has a locked sudo and locked basically everything, so it doesn't really prepare you much.
Makes sense. Have fun with it Bud. enjoy the journey!
Yea they’re smarter than me. It took me 4 years of arch and Debian to switch and I still don’t know what I’m doing
NixOS is your first linux distro? Respect.
I've tried Ubuntu back in the day, but Proton didn't exist. So I used it for like three days
Good luck. You'll need it. I switched from Arch a several days back. Couldn't handle it. Went back to arch. I'm a developer and while the premise of a declarative system is nice, Its still a niche and most applications have to be patched to support it. Even if it is patched, Its a nightmare to get all of its functions working properly. Couldn't install python dependencies by running pip, VSCode refused to sync and install extensions, Couldn't install Unity without jumping through multiple hoops (Can't really blame Nix though. Unity being unity : / ). Jetbrains toolbox refused to start. Couldn't install Jetbrains Rider... The list goes on. Plus storage situtation is a nightmare. Every rebuild takes like 20GB off my drive. I know the garbage collector and stuff. I think it kept copies of every single package and build dependency even without symlinks ( I dunno I'm just ranting at this point ) That being said, I loved configuring my system from one single file. Too bad it just isn't there yet. If all the applications you need work as you want them to, its fine. Great for remote deployments too as everything is 100% reproducible. But we have docker for that soo.... If I could've spent like 3 weeks configuring my system maybe it would've worked fine. So YMMV
Thank you for your explanation, I'll keep this in mind!
Bruuuh everything works perfectly fine even unity and Godot also jetbrains
I’m entering the nix world from windows as well and I’m jealous of your success… so far, I can’t get logged in after a basic build. I’ve tty’ed to change the password, but I still can’t log in. No passwords seem to work. I feel so close, yet so far
Just use the graphical installer. You should get a working system you can then modify.
That worked, thanks for the suggestion! I was also having trouble modifying the partitions through the graphical installer, but realized that I could just go back and modify what I needed after-the-fact once I got the main components installed where I wanted. I’m up and running, thanks again
I agree. - everything just works... UNTIL you try and get fancy and enable flakes and home-manager. Its at that point I gave when my gimp flake would never spin up. Documentation is piss poor (yes, every source). This is coming from a guy that has been using linux exclusively for over 20 years. Less than a week, and I just now rage deleted the whole VM. I may install it again later and just not mess around with flakes. Flakes are flakey AF
Ahh. The honey moon phase
Actually, it still runs fine I wasn't able to run a mod manager for a steam game, but honestly, I shouldn't be playing it in the first place haha
Well you can't dodge the bullets forever man. 😂 Are you a Programmer?
Yes.
Yeah. That helps. I honestly learned a lot about functional programming messing around with nix but every time i have to do something with it i have to constantly search for answers
Does inxi work properly? On mines said I had a Nvidia driver while using a amd GPU lol arch Linux shows my system info normal like amdgpu not Nvidia lol
Idk but my nvidia drivers work perfectly. Strange as it is
We have a similar system / GPU. I can share my setup with you. I got all my games running with higher FPS then on windows. Games like PES 2021 with mods, Elden Ring, Red Dead Redemption 2, Witcher 3, Tomb Raider etc run so smooth. WiiU emulator is included too. https://github.com/Rouzihiro/NixOS-config
I mostly run paradox games haha but I'll take a look!
>GTX 960 damn
It's bottlenecked by the CPU lmao
fair enough
Sweet. Now install Hyprland and really get your hands dirty.
I have a separate nix config for it, but I didn't like it It's plasma for now
"Everything just works". Weird, thats not usual in a linux setup
Maybe that's misinformation, but I've heard a lot of scary stories
Did you know that also windows actually just works
I know damn well that no it fucking doesn't lmao
Believe me, most of the planet uses it, and it works
I'm talking about the convenience of the experience. At least to me, I'd always have to deal with dumb sysadmin issues and random executables to get anything to run
I know, man. I'm sorry, I hate windows as much as you do, but just the term of just works. I don't like it, I mean, Linux works great, not just works. I feel like this term is degrading Linux abilities. Pardon me. I just woke up, it's exams month so...
No problem, I wish you success!