How to start using Nix(OS)

You mean for services.teamviewer.enable = true; ? No, you should not need any reboot: when you set services.teamviewer.enable = true; NixOs is clever enough to start/stop/restart the good services. If you set services.teamviewer.enable = false;, it will completely uninstall teamviewer, so sudo systemctl start teamviewerd.service will not work. You can however disable the daemon if you don’t want it to start by default, I guess:

systemd.services.teamviewerd.wantedBy = lib.mkForce [ ];

should work based on this answer Disable a systemd service while having it in NixOS's conf - #3 by jtojnar

OK, just a moment, i will try it out

OK, without reboot it won’t work. Can later try after reboot…

[wolf@daw:~]$ sudo systemctl start teamviewerd
Failed to start teamviewerd.service: Unit teamviewerd.service has a bad unit file setting.
See system logs and ‘systemctl status teamviewerd.service’ for details.
[wolf@daw:~]$ sudo systemctl status teamviewerd
○ teamviewerd.service
Loaded: bad-setting (Reason: Unit teamviewerd.service has a bad unit file setting.)
Active: inactive (dead)
Jan 11 15:53:11 daw systemd[1]: teamviewerd.service: Service has no ExecStart=, ExecStop=, or SuccessAction=.>
Jan 11 15:53:22 daw systemd[1]: teamviewerd.service: Service has no ExecStart=, ExecStop=, or SuccessAction=.>
Jan 11 15:53:33 daw systemd[1]: teamviewerd.service: Service has no ExecStart=, ExecStop=, or SuccessAction=.>
lines 1-7/7 (END)

used this line…

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)