Getting a nice laptop install

Trying to set up NixOS as my main system. I first installed Linux Mint on it to check if it works, and the I installed NixOS on it, but I’m missing a lot of functionality now.

What are some nice opinionated nixos settings to get to a pleasant “standard desktop” system so people can use it instead of having to fiddle with everything?

With Mint, I noticed these default features, in no particular order:

  • Cinnamon (Gnome 2 clone with lots of polish)
  • “Timeshift” snapshot/backup tool
  • Software app to get proprietary Skype, Chrome, Teams etc
  • Network manager app
  • Update manager that tells you about new updates and lets you install them
  • nonfree firmware manager that checks your hardware and installs what’s needed (I needed nothing)
  • nice graphical boot via efigrub
  • swapfile management (although not sure what it does, I never noticed it activated)
  • sound/camera apps/drivers (although the kernel doesn’t support my sound, in NixOS it does)
1 Like

Hi, I’m quite new to nixos so I might not be doing everything the right way, but this is what I use for some of the things you look for:

  • I use flatpack for proprietary apps that are not packaged in nixpkgs, like Teams (that’s in fact the only app I use it for), but there is packages for google-chrome, skype, discord, even steam… and a lot of other proprietary apps.
  • DE often come with their network manager in Nixos, I believe gnome makes no exception here but I only know that to be true for KDE and XFCE, there is a wiki post about gnome, it’s fairly straight-forward. I don’t know if you cinnamon is available though, you might be interested in this.
    If you want network support without needing a working DE, you could use:
    networking = {
      networkmanager.enable = true;
      interfaces.wlo1.useDHCP = true;
    };
    
  • I don’t know any grub theming tool working with nix, but you should be able to theme grub using boot.loader.grub.extraConfig option. Never tested that though.
  • Swap files basically are files you can use as RAM when you are coming short in resources. They can be managed with swapFiles option, but it is stated in the option’s description that you have to create the files beforehand, and it seems you cannot change swapfile size using nixos config.
  • About HW drivers, I believe kernel modules can be added through boot.kernelModules and boot.extraKernelModulePackages but I don’t really know how to use these options.

There is a lot of resources for simple configurations to get started in the nixos manual, for instance for setting up the X server related configs or flatpack. You can also look in this collection of configurations, some may be a bit over complicated to begin with, but this is still a great resource (There is a hardware config repo that has some interesting default options for laptops),

2 Likes

I am running NixOS on my laptops HP and Lenovo

Lenovo is more complete and works perfectly

HP work well as well but I didn’t optimize power management.

1 Like

Ah yes, flatpack seems like the solution for the proprietary stuff, and it’s size offers a nice incentive to try to use alternatives :wink:

I will take a look at the other tips, it seems like most functionality is available but not as polished - not that it really has to be.

Concerning EFI, grub in NixOS doesn’t support it, instead there’s systemd-boot which seems very basic but probably more sane.

TimeShift is probably just something to compile and write a module for, it seemed a lot nicer than snapper.

I think the packages for Cinnamon are available. It just looks like nobody has put together module yet.

Is timeshift really applicable to nixos? nixos has the ability rollback natively.

Try this:

services.fwupd.enable = true;

While I prefer systemd-boot personally. EFI grub is supported as well.

In addition to the normal grub stuff, you need to set.

boot.loader.grub.efiSupport = true;

If you want a full example, I can pull one out of a working configuration for you.

It really depends. Timeshift has a very specific purpose around system recovery and is limited in it’s options. snapper is a more general purpose tool for snapshots. I am not sure I fully understand the point of something timeshift with nixos. snapper seems much more applicable if you are running btrfs.

EDIT: Oops, my initial response was the first thing I did when I woke up this morning. It was intended for someone new to nixos which you clearly aren’t. Sorry about that.

If you have a popular enough laptop model it might have options in nixos-hardware that you can either copy or import. For example, the Dell XPS config fixes a battery draining issue.

1 Like

I like automated time-spaced snapshots on my home folder, that’s what I use snapper for on my production vms but TimeShift seems easier to use.

Of course, both cause btrfs to fail when the disk is near full but that’s another story.

I didn’t think of looking for efigrub because the nixos-generate-config said to use systemd-boot :slight_smile: other things mentioned here were also in the manual. It may be because I think I know what’s going on so I don’t think to look, but IMHO NixOS has a bit of a discoverability problem. The huge slow-loading manual doesn’t help, but that’s being addressed I saw.

No offense taken on the newbie approach, in some ways I am for desktop use. It’s been 6 years since I last tried to run a Linux desktop.

related to having an opinionated initial setup: Why I switched to Manjaro Linux - #22 by jonringer