nixos-config/users/simon/modules/corectrl.nix

30 lines
687 B
Nix

# SPDX-FileCopyrightText: 2022 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{ lib, nixosConfig, pkgs, ... }:
lib.mkIf nixosConfig.programs.corectrl.enable {
systemd.user.services.corectrl = {
Unit = {
Requires = [ "tray.target" ];
After = [ "graphical-session-pre.target" "tray.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.corectrl}/bin/corectrl";
};
};
xdg.configFile."corectrl/corectrl.ini".text = lib.generators.toINI { } {
General = {
startOnSysTray = "true";
};
};
}