• 50 Posts
  • 172 Comments
Joined 1 year ago
cake
Cake day: July 9th, 2023

help-circle








  • I use both 1 and 3, personally (although docker rather than podman). I normally prefer the nix way but it doesn’t support every service. I like that nix config is all in one place. In theory, so is docker-compose to am extent but there are usually exceptions and things can get complex. I also hate having to directly manage containers with minimal commandline tools.

    But yeah the whole translate config routine in nix is kind of annoying, and I often need to experiment to get the options right if they aren’t documented.



  • (What about options in flakes.nix? Should I search those on the flakes/options tab?)

    Not quite sure what you mean here. I normally only configure out-of-tree packages as flake modules (or whatever the term is), and I don’t think there is an official collection/search page for these. It’s mainly that certain packages require it like lanzaboote, and home-manager for that matter.

    Once I enabled home-manager, I saw that in ~/.config/nixos a flakes.nix and a home.nix files appeared. I already have a flake.nix and a home.nix files in my etc/nixos directory. What’s going on?

    It sounds like you configured home-manager system wide, probably through /etc/nixos/flake.nix, but then called the home-manager executable. If you did configure it like this then you do not need to call home-manager ever since nixos-rebuild etc commands will handle this for you.

    Does putting packages in configuration.nix use the version control flakes provide?

    Typically, it will be configured to follow inputs.nixpkgs so packages will use versions of whatever revision is currently pulled. In my system that is:

    inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    

    and then you essentially pass that to configuration.nix, and home.nix.

    And although you seem to already be using flakes, when you call:

    nix flake update
    

    a new revision of input.nixpkgs will be pulled, and so packages configured in configuration.nix will be updated when you next call

    nixos-rebuild switch
    

    or whatever you used to update your system.

    Refer to: https://nixos-and-flakes.thiscute.world/

    if you haven’t already as there is where I got started from for the most part. There’s a lot more detail I missed since nix and flakes are pretty complex (and I don’t fully understand much of it either).


  • System packages in configuration.nix, user packages in home.nix. I’d say anything that is non-interactive and/or requires root access is a good rule of thumb for system packages. Beyond that I try to use modules for configuring packges and there is usually only one of nixos and home manager options (sometimes there are duplicates).

    As for flakes I mostly use it to handle a bunch of different systems from one config and any flake specific configs. I also use standalone flakes for dev environments but that’s not related to the system config.








  • Linux currently doesn’t have a concept of “exclusive fullscreen” in the way that Windows does. A new wayland protocol can probably resolve this, although I’m not sure if any work has been done for that yet.

    You could do it manually though most likely by having a script check if the current window is fullscreen (which you can do with sway/wlroots easily at least) and then apply the change. But there would be some false positives where you might not want the behaviour (like a video player), although if you’re watching high resolution/high framerate content it would be useful.


  • It depends on the GPU I suspect. The 6XXX series doesn’t appear to have that issue, at least not in a significant way. But yeah, the 7XXX series having power consumption issues isn’t too surprising.

    As for the quote, the “more aggressive ramping” is about its behaviour under load, which you probably do want if you’re playing games.

    You can revert the change in the same way as you can make the change now, with a udev rule. And you can change it on the fly with a script if needed.

    Udev rule:

    KERNEL=="card0", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="manual", ATTR{device/pp_power_profile_mode}="0"
    

    (you might be able to leave the power_dpm_force_performance_level part unset)

    You can also try the compute (5) or VR (4) modes which have slightly different behaviour (I use the compute mode on my systems even though they are mostly for gaming).

    I believe some of the third party GPU control utilities can also do this, but I don’t personally use them.