How to start using Nix(OS)

You put both:

    services.teamviewer.enable = true;
    systemd.services.teamviewerd.wantedBy = lib.mkForce [ ];

?

No, the last line.

And a reboot doen’t help

Oh, you need both: the first line just tells “please install teamviewer and create a new service called teamviewerd”, the second line just says “in the teamviewerd service, remove the line wantedBy, i.e. do not start it automatically”.

Works like a charm… Very nice…

And now i can stop the daemon with systemctl. after closing the app.

1 Like

Programstarter does not work.
Screenshot_20240113_180743
But i can start it via terminal…

On other distro there is a ./application dir filled with .dektop files. The rustdesk application has no starter, but can also started via terminal…

Oh, it is a bug of the derivation, here

The ${placeholder "out"}/bin should be removed to keep the path relative, as advised here What is the recommended use of makeDesktopItem? How to setup the icon correctly? - #6 by zarel as it allows better theming, wrappers by users etc. Right now, the issue is that makeDesktopItem will create first a different derivation, as seen in your screenshot, that contains wnly the desktop file, so the placeholder will point to this nearly empty directory.

I don’t have a computer with me right now, but it can be a nice simple first pull request for you if you want to get involved in nixpkgs. If not, just create a new issue in github with the maintainers of the package (cf names at the end of the above link) and me in mention, explaining what I just explained above.

And right now, you can temporarily fix your issue by using overrideAttrs, like replace anydesk.in your configuration with something like

(anydesk.overrideAttrs (finalAttrs: previousAttrs: {
  desktopItems = [
    (makeDesktopItem {
      name = "AnyDesk";
      exec = "anydesk %u";
      icon = "anydesk";
      desktopName = "AnyDesk";
      genericName = description;
      categories = [ "Network" ];
      startupNotify = false;
    })
  ];
});
)

(I can’t test but should work)

Hi, tomorrow i can look at it. Today i’m on tour for radio production. 1st time live transmitting with nixos. ~10000 listener via FM transmitter…


Oh good luck, seems very impressive. What kind of software/hardware are you using?

Oh, that’s very simple. Some 48V powered condenser microphones, a mixer with usb audio interface and the software “butt” to stream the audio to an icecast server, the studio is playing out the stream to put it on the air.

Yes, now i have a case by not running software…

[wolf@schwoon-desktop:~/APP]$ ./MQTT-Explorer-0.4.0-beta1.AppImage
Could not start dynamically linked executable: ./MQTT-Explorer-0.4.0-beta1.AppImage
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
Frequently Asked Questions — nix.dev documentation

First i search for it in the nix packages…

For App images, you can sometimes use appimage-run ./yourimage.AppImage, but sometimes it fails without obvious error message if a lib is missing. Enabling:

programs.nix-ld.enable = true;

will save you quite some headacke, especially if you develop/use nodejs applications that love to include pre-build binaries. Of course, you can also package the application yourself and submit it in nixpkgs, either from source (for Electron app it might be less obvious than for usual apps), or directly by wrapping the app image, apparently someone already tried to do that here for your program mqtt-explorer.nix · GitHub.

OK, before i’m trying this i check the package “mqttui”. And i found the real-vnc-viewer, that i sometimes use for local vnc server.

But the possibility to run AppImage application is maybe useful and good to know the workaround.

Sometimes it is not so bad, when often used programs are not available without trouble… My solar inverters mqtt data… :slight_smile: Show with mqttui

Ahah nice. There is also mqttx that is in the process of getting added to nixpkgs. The Pull Request is just waiting for some testers mqttx: init at 1.9.8 by gaelreyrol · Pull Request #243622 · NixOS/nixpkgs · GitHub and will be merged after. You can be one of them :stuck_out_tongue:

Oh, that looks nice and colorful… And I can test that? I’ll have to see how I can proceed with that testing first…

You should just be able to type:

$ nix run 'nixpkgs#nixpkgs-review' pr 243622

And it will automatically build it, and put you in a shell with the binary installed. Run it: if it works, comment that it works for you in the above github PR link :wink:

[wolf@schwoon-desktop:/etc/nixos]$ nix run ‘nixpkgs#nixpkgs-review’ pr 243622
Has to be executed from nixpkgs repository

Oh, yes, I forgot, you need to first run:

$ git clone https://github.com/NixOS/nixpkgs
$ cd nixpkgs

(I advise you to clone it once for all in your home folder)

Of course… :face_with_peeking_eye:

There is also another solution if you use flake and want to install the package system-wide (useful to test the .desktop file for instance and integration, or to use it until it is made available): you can add an input in your flake.nix like:

inputs.mqttx-pr.src = "github:gaelreyrol/nixpkgs/mqttx-init-1.9.4";

and in your configuration.nix, you should be able to add

environment.systemPackages = with pkgs; [
  # your other packages ...
   inputs.mqttx-pr.legacyPackages.${system}.mqttx
];

in your list of installed packages. To make sure that system is well defined, you certainly need to also add system in the first line of your configuration.nix like:

{ inputs, config, pkgs, lib, system, ... }:

and change in flake.nix the specialArgs line like:

specialArgs = { inherit inputs; inherit system; };