{ inputs, moduleWithSystem, ... }: { flake.nixosModules.gotify-desktop = moduleWithSystem ({self', ...}: { environment.systemPackages = with self'.packages; [ gotify-desktop ]; }); perSystem = { pkgs, inputs', ... }: { packages = { gotify-desktop = let config-file = pkgs.writeText "config.toml" '' [gotify] url = "wss://ntfy.voidarc.co.uk:443" token = { command = "cat /run/secrets/gotify-desktop-key"} [notification] min_priority = 1 ''; in inputs.wrappers.lib.wrapPackage ({...}: { inherit pkgs; package = inputs'.gotify-desktop.packages.default; flags = { "-c" = config-file; }; }); }; }; }