I have never installed a nix package on Steam Deck under SteamOS before. I followed his instructions from this website , everything is ok without problem, then I installed an app with this command nix-env -iA nixpkgs.mullvad-vpn. When I finish installing an app, I open Mullvad GUI, I see a message

Unable to contact the Mullvad system 
service, your connection might be unsecure. 
Please troubleshoot or send a problem 
report by clicking the "Learn more" button.  

I don’t know how to fix this issue

My Nix version is 2.32.4 and my SteamOS version is 3.7.13

  • Paulemeister@feddit.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    24 hours ago

    I would generally not recommend installing packages like that (even though it’s often the first thing you see on websites), prefer declaring it in your configuration.nix or use nix-shell -p for a quick test of a package. It might be helpful to run the program through the terminal to get more useful debugging output

    • Pamboo@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      23 hours ago

      Do you mean that this command nix-env -iA nixpkgs is not recommended ? For what reason ? If it’s not recommended, how do I uninstall an app that I installed packaged with nix-env ? Then I add a configuration.nix with this command kate /etc/nixos/configuration.nix , then I copy and paste

        environment.systemPackages = [
          pkgs.mullvad-vpn
        ];
      

      is it correct ? Because I don’t have a “nixos” folder in my /etc/. After creating a .nix configuration for a Mullvad package, how do I install this app ? I have already executed this command nix-shell -p mullvad-vpn before but it gives a result

      Error: Management RPC server or client error  
      
      Caused by:  
               0:   transport error  
               1:   No such file or directory (os error 2)  
               2:   No such file or directory (os error 2)  
      
      • Zangoose@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        22 hours ago

        The point of using Nix as opposed to something like flatpak (or apt) is that all of your packages are managed through a text file (aka “declaratively”). The benefit of this approach is that, if you ever install a package that breaks something, you can easily undo any installation or system setting by reverting it in that single location. You also don’t get the problem where your computer slowly fills up with stuff you no longer need, because necessary programs would only be pulled in if they’re needed by ones you defined. This is also very nice for developers because it makes a system environment easy to replicate.

        By installing packages with that command, you’re removing the main benefits of Nix, which is why it isn’t recommended. The recommended way to do it is to edit your nix configuration file with the package you want, and then run the nix rebuild command which will actually download the package. (There’s also a clean command which will fully remove previously installed programs no longer being used)

        NixOS is a Linux distribution built entirely around this concept, where everything about the OS is managed by Nix. Since you’re just installing Nix on a steam deck, the config file won’t be under /etc/nixos, but a different location. I’m honestly not too sure where though because I’ve only ever used Nix on NixOS.