fix: Fixed the issue home-manager module
This commit is contained in:
@@ -90,8 +90,6 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
home.packages = [cfg.package];
|
||||
|
||||
systemd.user.services.hyprmonitors = {
|
||||
Unit = {
|
||||
Description = "Hyprland Monitor Control Server";
|
||||
@@ -133,36 +131,5 @@ in {
|
||||
WantedBy = ["hyprland-session.target"];
|
||||
};
|
||||
};
|
||||
|
||||
# Create a target for Hyprland session if it doesn't exist
|
||||
systemd.user.targets.hyprland-session = mkIf (!config.systemd.user.targets ? hyprland-session) {
|
||||
Unit = {
|
||||
Description = "Hyprland session";
|
||||
BindsTo = ["graphical-session.target"];
|
||||
Wants = ["graphical-session.target"];
|
||||
After = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
|
||||
# Optional: Add a desktop entry for manual control
|
||||
xdg.desktopEntries.hyprmonitors-control = mkIf (cfg.enable && cfg.host == "127.0.0.1") {
|
||||
name = "Hyprmonitors Control";
|
||||
comment = "Control Hyprland monitors via web interface";
|
||||
exec = "${pkgs.xdg-utils}/bin/xdg-open http://${cfg.host}:${toString cfg.port}/health";
|
||||
icon = "preferences-desktop-display";
|
||||
categories = ["Settings" "System"];
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
};
|
||||
|
||||
# Add some useful aliases for controlling the service
|
||||
home.shellAliases = mkIf cfg.enable {
|
||||
hyprmonitors-start = "systemctl --user start hyprmonitors.service";
|
||||
hyprmonitors-stop = "systemctl --user stop hyprmonitors.service";
|
||||
hyprmonitors-restart = "systemctl --user restart hyprmonitors.service";
|
||||
hyprmonitors-status = "systemctl --user status hyprmonitors.service";
|
||||
hyprmonitors-logs = "journalctl --user -u hyprmonitors.service -f";
|
||||
hyprmonitors-test = "curl http://${cfg.host}:${toString cfg.port}/health";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user