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 {
|
||||
type = types.str;
|
||||
default = "graphical-session.target";
|
||||
default = config.wayland.systemd.target;
|
||||
defaultText = literalExpression "config.wayland.systemd.target";
|
||||
example = "sway-session.target";
|
||||
description = ''
|
||||
Systemd target to bind to.
|
||||
|
@ -107,7 +108,8 @@ in {
|
|||
Description = "Idle manager for Wayland";
|
||||
Documentation = "man:swayidle(1)";
|
||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
PartOf = [ cfg.systemdTarget ];
|
||||
After = [ cfg.systemdTarget ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.swayidle = {
|
||||
|
@ -50,6 +50,7 @@
|
|||
Type=simple
|
||||
|
||||
[Unit]
|
||||
After=graphical-session.target
|
||||
ConditionEnvironment=WAYLAND_DISPLAY
|
||||
Description=Idle manager for Wayland
|
||||
Documentation=man:swayidle(1)
|
||||
|
|
Loading…
Reference in a new issue