NixOS Drains my Laptop Battery in 10 min

That’s extremely odd but certainly nothing a kernel optimisation would influence to this degree.

Have u tried xanmod kernel and set custom systemctl settings? I tried and made a huge difference in system being alot more responsive along with stable nvidia drivers (x11 session)

Using xanmod feels like it may be an unfair advantage compared to vanilla Manjaro. :slight_smile:
Also a bit concerned about security/compatibility issues around running too uncommon kernels.

Running with services.xserver.videoDrivers = [ "nvidia" ]

What custom systemctl/D settings do you suggest?

https://github.com/tolgaerok/nixos-kde/blob/61155c6b23133109889b1a3f81a11374465ed93c/core/gpu/intel/intel-laptop/HP-Folio-9470M/Eilite-Folio-9470M-HD-Intel-4000.nix#L42

Im currently back on fedora39 but those settings worked on my hp laptops, it may work for u

giving nixos a rest for awhile as its lack of FSH got the better of me

1 Like

can i ask why the you need the FHS, i presume you have application that requires needs things in FHS.

Unfortunately nix doesn’t particularly like it. I hope you come back one day.

as outlined by this meme.

https://www.reddit.com/r/NixOS/comments/p7tarc/destroyer_of_fhs/

Just a personal choice. I just found the documentation really poor and outdated. For me it was like heres a small example tryvit or reverse engineer it and good luck.
Just my personal gripes with it. In saying that i didnt find thatvin fedora. Its documentation is amazing and trouble shooting guides rather amazing

that is a shame, I must of missed all your requests for help here.

@fricklerhandwerk the one man nix army, is dedicating his life force to making the documentation top notch, kudos to them!

I hope you come back one day and help us out, because fedora’s days are numbers as is all the other Linux ‘distros’. Nothing to do with the sweat , tears and talent of the software engineers writing and maintaining those projects , or their skills, …it’s quite the opposite… , it’s due to the on coming software complexity crisis.

If you going take anything away from your fling with nix, is that it is a tool that manages software complexity… and that complexity is not getting any better in any language ecosystem.

have a lol at this. https://x.com/tsoding/status/1723444810961318017?s=20

2 Likes

Navigating NixOS has been a bit of a rollercoaster for me. While I genuinely appreciate the platform, troubleshooting has proven to be a source of frustration. Finding solutions online can feel like trying to reverse engineer the issues at hand.

Today, I reconnected the NixOS SSD and was greeted with a slew of updates. Surprisingly, I found solace in the welcoming embrace of the immutability aspect. Currently, I’m giving it another go, but how long I’ll stick with it is uncertain. Despite the troubleshooting challenges, it’s performing exceptionally well on the Xanmod kernel and an old Nvidia GT1030 in an X11 session.

Managing the increasing complexity of software is a real challenge, and you’re right about Nix being a handy tool for that.

But, saying all other Linux distros are on their way out might be a bit much :sweat_smile:. Each distro has its strengths. Like Fedora, it’s known for being cutting-edge and big on open source.

The worry about software complexity isn’t new, and how we deal with it in the future is up in the air. Whether Nix becomes the standard or we find some other cool solution, the open-source dev’s usually figures things out :nerd_face:

If you feel like you need a FHS distro, just enable nix-ld and add any missing lib to it. It will save you a lot of frustration as npm/pip/… will now work out of the box :wink:

1 Like

Hold on… say what? Explain your sorcery please.

1 Like

so is it just

environment.systemPackages = [
    pkgs.nix-ld
  ];

programs.nix-ld.enable = true; & programs.nix-ld.libraries ???

Don’t add it to systemPackages. You can take this configuration as an inspiration: https://github.com/Mic92/dotfiles/blob/1b76848e2b5951bc9041af95a834a08b68e146fd/nixos/modules/nix-ld.nix (you can ignore the nix-ld-rs line for now).

I gave an explaination here with most useful libraries:

2 Likes

An aside: I keep referring back to that StackExchange link, @tobiasBora . It is part of the “NixOS canon” for me. Thank you for it!

1 Like

Ahah glad it helps ^^ Then you might also like my newer answer here for generic derivations packaging - How to package my software in nix or write my own package derivation for nixpkgs - Unix & Linux Stack Exchange

1 Like