fix: Fixed the issue home-manager module
Some checks failed
build / checks-build (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled
build / checks-matrix (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-08-16 20:02:31 +05:30
parent 50f0d2173e
commit ab566dc44d

View File

@@ -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";
};
};
}