swayidle: use config.wayland.systemd.target
Also add `Unit.After`.
This commit is contained in:
parent
0734cfab07
commit
89fe48b1c1
2 changed files with 6 additions and 3 deletions
|
@ -88,7 +88,8 @@ in {
|
||||||
|
|
||||||
systemdTarget = mkOption {
|
systemdTarget = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "graphical-session.target";
|
default = config.wayland.systemd.target;
|
||||||
|
defaultText = literalExpression "config.wayland.systemd.target";
|
||||||
example = "sway-session.target";
|
example = "sway-session.target";
|
||||||
description = ''
|
description = ''
|
||||||
Systemd target to bind to.
|
Systemd target to bind to.
|
||||||
|
@ -107,7 +108,8 @@ in {
|
||||||
Description = "Idle manager for Wayland";
|
Description = "Idle manager for Wayland";
|
||||||
Documentation = "man:swayidle(1)";
|
Documentation = "man:swayidle(1)";
|
||||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = [ cfg.systemdTarget ];
|
||||||
|
After = [ cfg.systemdTarget ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
|
@ -50,6 +50,7 @@
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
|
After=graphical-session.target
|
||||||
ConditionEnvironment=WAYLAND_DISPLAY
|
ConditionEnvironment=WAYLAND_DISPLAY
|
||||||
Description=Idle manager for Wayland
|
Description=Idle manager for Wayland
|
||||||
Documentation=man:swayidle(1)
|
Documentation=man:swayidle(1)
|
||||||
|
|
Loading…
Reference in a new issue