From 882391a1620f5179eab0f9f4b96f85af875cbb34 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 24 Apr 2016 19:44:01 +0200 Subject: [PATCH] redshift service: run as user service Fixes #14882. --- nixos/modules/services/x11/redshift.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/x11/redshift.nix b/nixos/modules/services/x11/redshift.nix index 4318a17a4fa5..8f1e317e52b0 100644 --- a/nixos/modules/services/x11/redshift.nix +++ b/nixos/modules/services/x11/redshift.nix @@ -94,11 +94,9 @@ in { }; config = mkIf cfg.enable { - systemd.services.redshift = { + systemd.user.services.redshift = { description = "Redshift colour temperature adjuster"; - requires = [ "display-manager.service" ]; - after = [ "display-manager.service" ]; - wantedBy = [ "graphical.target" ]; + wantedBy = [ "default.target" ]; serviceConfig = { ExecStart = '' ${cfg.package}/bin/redshift \ @@ -107,10 +105,10 @@ in { -b ${toString cfg.brightness.day}:${toString cfg.brightness.night} \ ${lib.strings.concatStringsSep " " cfg.extraOptions} ''; - RestartSec = 3; + RestartSec = 3; + Restart = "always"; }; environment = { DISPLAY = ":0"; }; - serviceConfig.Restart = "always"; }; };