Hey, no doxxing!
Wait you are enjoying NixOS? I though we were all in for the suffering?
Yes and yes
plot twist: under the hoodie they're absolutely jacked
absolute sleeper build
Go on
Arch is 2022. NixOs is where it's at now
Tried to switch, but a couple of pieces of software did not function correctly on nix, and i work a ton in python and i couldn't get anything to work there, issues with missing system libraries and so on i think, i ran out of free time for tinkering and had to switch back
I use arch btw
It's usually pretty straight forward to get python things to work once you know how, but yeah, you can still hit edgecases with poorly structured dependencies. Even in simple cases, having to package things as an end user can be a tough barrier. Personally, I find the pain to be well worth what nix offers me, but I know that it's just not a good fit for the vast majority of people.
Is it? Every time nixpkgs changes the python minor version all of my virtualenvs break, which is a pain. I guess I need to look into dev shell or something.
Yes you need to use a shell to make it reproducible in the nix sense; a regular venv will try to point to the nix store or lose libraries (or try to dynamic-link stuff) when your system env changes which is why you need it to be independent of it.
I don't bother with venvs in my own projects because nix kind of subsumes its purpose, but it's possible to work with them still.
Something that might help: devenv. I haven't used this personally but the UX looks like an upgrade. (I just use flakes with dev shells defined inline long-form)
This video came across my feed last night, and might give you a rough idea: https://youtu.be/jldArhyi6jM&t=581
If you don't use a venv at all, do you add every new requirement to your main config.nix?
If it matters, I'm not a real developer. I don't deploy or package anything. I'm just making tools for my own work. I'm not concerned about Nix-like reproducibility for my python scripts because they're pretty simple and only live on my machine.
No, not to my nixos configuration. In fact I don't even have a global / system / user-wide Python interpreter. I rely on nix shells and package closures; no imperative use of python.
I'm not a big python dev; my meaningful experience is with systems languages. But for a release or project i intend to be consumed outside of nix, I'll use venvs and a requirements file because that's just the right way to do things.
But what I meant was that I'd use a nix shell or build package that uses py libs that are already packaged for nix, or package the ones that aren't myself, and just use the nix closure as my venv; no regular venv or pip workflow.
Devenv seems to let you just point at a requirements file and it builds the venv for you. Very clean for portability beyond nix consumers that way. But most of my Python projects are personal utilities and can target nix exclusively.
For most dev libraries I use
https://github.com/nix-community/home-manager
Which manages
Which manages uv and pyenv and stuff for python, and package managers for just about every other language I dev in.
It’s version managers all the way down lol, but it’s the only way I’ve found to have proper declarative versions within my nix config that don’t rely on the nixpkgs ecosystem changing, and doesn’t require manually managing a package manager for every single language I use
I use home-manager too, but maybe I'm not leveraging it enough since I'm the only user. I'll look at Mise, thanks.
Yeah, nixos btw is a big commitment that works only if you have enough time and/or you highly value what it provides. Though if you have lots of time to get past the learning curve and get things going the maintenance becomes much less of an issue later on which is nice.
I've been using NixOS for the past 4 years.
I started a business with the mission statement to replace local business machines with a windows-like platform, based on NixOS.
I can say with confidence that the maintenance does not become much less of an issue, but it certainly becomes more transparent.
Oof. Good to know. I'm lucky enough to only use it personally on a smaller scale where once something is set up I don't need to touch it again and if I do it's easy to do with the previously set up foundation. Do you regret using NixOS? Or do you think there are better alternatives in which case which ones?
NixOS is fucking GOATed lol. I can't imagine a business managing a fleet which isn't based on NixOS - what a fucking nightmare lol.
How long have you been using it for? Because you will certainly run into complications eventually, as options change, packages become depreciated, and others get marked as unsafe.
Around half a year based off my commits which in retrospect is a short amount of time. It took me off guard because it felt like around a year before checking. Probably because of the steep learning curve that put me through a lot in a short amount of time. Lol
I guess I will have my coming of age ceremony when I will bother doing my first major nixos update since I haven't bothered doing one yet as I haven't felt the need to warrant spending the time on it. ❄️
Oh lol. You're not on unstable?
That explains why you've not had any issues lol.
Changing channels every six months is a dice roll - sometimes fine, other times shit breaks.
Depends how complex your system is I suppose, but the major releases are always the most work if youre pinning versions.
Oh lol. You're not on unstable?
Uh oh. I thought it's a common practice to use stable by default and unstable where needed for stability. Is this less common than I thought?
It's mostly the difference between:
"Wanting to resolve all your discrepancies at once"
Or,
"Gradually, as they roll out"
Stable is less work for sure, but it just means having to do everything at once.
You just need to remember to update your channel in your flake every six months and then set your options as they rotate.
It sounds like it's work for the sake of work.
Anybody I ask about the benefits of nix can't really say anything apart from reproducibility and quickly spinning up your system again if you need to.
Those things aren't really problems that need solving, in my opinion. They already have goods solutions. Especially ones that are simpler than nix 😅
I use Arch btw.
For me I like iterating on my home lab so it’s nice knowing I 100% did not forget that I left some port open or service running, it’s all nicely defined in a configuration module I set up.
There’s a low chance I’m going to reuse my configs, but it’s nice I have the option.
Probably the biggest value is it’s all written down nicely in a structured and documented system instead of my old sub folders of just/makefiles and bash scripts and’s inlined configuration.
Then there’s also nice stuff: my config also defines a dashboard for checking the status of my services (when I add a new service, it regenerates as the service is added automatically), I can see which users I created to run in containers, i can experiment with a new desktop environment and just comment out a block to go back.
Documented declarative centralized configuration of all my systems; that value can't be overstated.
Then the fact that I can run any version of any nix package from anywhere at any time with a single terminal command,
the ability to effortlessly and cleanly switch desktop environments with completely no friction or fear,
to be able to roll back by booting into any previous configuration still on disk, or entirely rebuild any older configuration I've tracked in git,
Painless and fearless updates with a rolling release, very little chance of borking and I can never get out of step; doesn't matter if I update once an hour or once a year,
I can share my settings with friends e.g. they can try out my MPV config with a single nix command, or consume my flake outputs and add it to their system with merge/overriding changes,
I can clearly version system dependencies for everything that needs them without shipping containers,
I can define development shell environments which is basically like python venvs with requires profiles but for every language,
I can remotely provision a machine, including disk partitioning and luks and initrd ssh, with a single command,
There's a plethora of modules that make setting up complex services with sensible defaults as simple as "enable = true;",
... I could probably go on for a while but yeah
I guess it's all down to use cases, eh. I have no use for most of that, so using nix makes no sense for me.
And the things that I do do/use in that list, it's just as easy to do without nix, if not easier, such as changing the desktop environment/compositor e.g. Just edit my login shell's config file on a single line, usually. Stuff like that. 👍 No need to learn a whole ass language for that, or learn a new domain language. I like to keep it simple when I can.
Definitely. It's totally not the right thing for everyone But coming from windows, I remember the first time I wanted to switch from gnome to kde on arch resulted in a week of pain before just reinstalling... As someone who's very forgetful, I also tried to write scripts to automate the changes I make on new systems, and remember what weird fixes I applied, where, and why; would usually end in disaster because of how fragile I felt everything was. I tried freebsd, debian, ubuntu, arch, manjaro, mint, even backtrack5 way back when. None of them stuck for one reason or another. NixOS is the first distro I've used long-term as a daily driver, and I'm pretty convinced it will be the only distro I use going forward (in one form or another).
And regarding my point about update frequency, I mention that also because of my experience with arch. Everything is user-error. Reminds me of the straight to jail meme. Update too fast? Borked. Update too slow? Believe it or not, also borked. Update without reading the forum? Straight to borked. Not so much a problem for me now.
But again, totally not for everyone. The vast majority even. But it jives with whatever part of whatever spectrums I'm on.
Here's how you install Gnome in nixos
services.desktopManager.gnome.enable = true;
Here's how you also install gdm
services.displayManager.gdm.enable = true;
And on Arch: doas pacman -S gnome gdm
😊
It's about remembering that you did. I have no idea what changes I've made to my ancient Ubuntu box so if an upgrade borks my system again I'm SOL
Also, a Nix upgrade won't break your system, unlike Ubuntu
Yeah, better to use Arch or nix to avoid system breakage 👌
Nix, yes, because it has rollbacks
If you need rollbacks, of course. I don't.
You need them like you need fire extinguishers
My Ubuntu LTS upgrade failed. Would have killed for a rollback
You need fire extinguishers if you have something worth saving.
-
I like having the same system configuration across machines and be sure that everything is the same.
-
I like having all configuration in one place and have comments near the relevant code for extra clarity.
-
Nixos makes setting up root on ZFS a breeze.
-
System as nix configuration makes it very easy to track changes with version control and informative commits.
-
If I fuck up the system I can easily boot into older generation.
-
System can rebuild only if everything (with proper checks) succeeds giving you a greater confidence in things working.
-
System reinstals are quick and easy so on hardware failure you can go back to work very quickly without having go spend days and weeks getting your system so vagualy similar state as before.
-
Nixos made it easy for me to set up mirrored boot so my system will still work fine when one of my boot drives fails.
-
I get to know what is actually installed on my devices and can easily get rid of it.
-
No dependency hell.
-
I can easily try out a program before installing it permanently with nix shell.
-
Impermanence helps me ensure that every folder and file that I need to keep is documented and keeps them in one place for very easy backups and I have 100% confidence at my backups have everything important.
And many other bigger and smaller things that I can't remember right now. I'd honestly be interested in solutions simpler than nix providing the same or greater benefits with more simplicity.
E: Also, because my original comment wasn't well worded I will mention that I meant that once you learn how to work with nixos things become easier and once you get the setup going it's just there continuing to work since the effort is paid in advance and you continue getting the benefits just like that.
I came from Debian and Arch and was pleasantly surprised at how easy to set up and run NixOS is. I've been using it on my personal laptop for months now without any major issues.
It's interesting to see how some people switch with ease and some struggle with it a lot. Haha
Don't get used to it, it's maintained by sloppers so it's only a matter of time before it breaks again.
I don’t think there’s anything wrong with installing homebrew into your NixOS system if that helps you get stuff done
Without the standard file hierarchy (which can be enabled), most executables straight up wouldn't work. The linker and standard library .so files aren't where they're expected to be.
It's maintained by sloppers, idk why anybody would want to switch to that.
The weakest Debian using greybeard :
OldBeardyGuyAtAnvil.jpg
Mhm debian users are, indeed, dwarves
humanConfiguration."user".gender = {
female.enable = true;
male.enable = lib.mkForce false;
};
humanConfiguration."user".gender = {
enable = false;
#female.enable = true;
#male.enable = lib.mkForce false;
};
{ lib, options, ... }:
let
names = lib.filter
(name: lib.hasAttrByPath [ name "enable" ] options.gender)
(lib.attrNames options.gender);
in
{
config.gender = lib.genAttrs names (_: {
enable = true;
});
}
That way I know my configuration will always be comprehensive even when nixpkgs releases a new gender
Kinda true tho ಠ_ಠ
linuxmemes
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
- Don't get baited into back-and-forth insults. We are not animals.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudoin Windows. - No porn, no politics, no trolling or ragebaiting.
- Don't come looking for advice, this is not the right community.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
- This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
- Comments written in other languages are allowed.
- The substance of a post should be comprehensible for people who only speak English.
- Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures
We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations. - Keep discussions polite and free of disparagement.
- We are never in possession of all of the facts. Defamatory comments will not be tolerated.
- Discussions that get too heated will be locked and offending comments removed.
Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.