File tree 5 files changed +82
-0
lines changed
tests/modules/services/redshift-gammastep
5 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
gammastep-basic-configuration = ./gammastep-basic-configuration.nix ;
3
+ gammastep-tray-configuration = ./gammastep-tray-configuration.nix ;
3
4
redshift-basic-configuration = ./redshift-basic-configuration.nix ;
5
+ redshift-tray-configuration = ./redshift-tray-configuration.nix ;
4
6
}
Original file line number Diff line number Diff line change
1
+ [Install]
2
+ WantedBy =graphical-session.target
3
+
4
+ [Service]
5
+ ExecStart =@gammastep@/bin/gammastep-indicator -c /home/hm-user/.config/gammastep/config.ini
6
+ Restart =on-failure
7
+ RestartSec =3
8
+
9
+ [Unit]
10
+ After =graphical-session.target
11
+ After =tray.target
12
+ Description =Gammastep colour temperature adjuster
13
+ Documentation =https://gitlab.com/chinstrap/gammastep/
14
+ PartOf =graphical-session.target
15
+ Requires =tray.target
Original file line number Diff line number Diff line change
1
+ {
2
+ services . gammastep = {
3
+ enable = true ;
4
+ provider = "manual" ;
5
+ dawnTime = "6:00-7:45" ;
6
+ duskTime = "18:35-20:15" ;
7
+ settings = {
8
+ general = {
9
+ adjustment-method = "randr" ;
10
+ gamma = 0.8 ;
11
+ } ;
12
+ randr = { screen = 0 ; } ;
13
+ } ;
14
+ tray = true ;
15
+ } ;
16
+
17
+ nmt . script = ''
18
+ assertFileContent \
19
+ home-files/.config/gammastep/config.ini \
20
+ ${ ./gammastep-basic-configuration-file-expected.conf }
21
+ assertFileContent \
22
+ home-files/.config/systemd/user/gammastep.service \
23
+ ${ ./gammastep-tray-configuration-expected.service }
24
+ '' ;
25
+ }
Original file line number Diff line number Diff line change
1
+ [Install]
2
+ WantedBy =graphical-session.target
3
+
4
+ [Service]
5
+ ExecStart =@redshift@/bin/redshift-gtk -c /home/hm-user/.config/redshift/redshift.conf
6
+ Restart =on-failure
7
+ RestartSec =3
8
+
9
+ [Unit]
10
+ After =graphical-session.target
11
+ After =tray.target
12
+ Description =Redshift colour temperature adjuster
13
+ Documentation =http://jonls.dk/redshift/
14
+ PartOf =graphical-session.target
15
+ Requires =tray.target
Original file line number Diff line number Diff line change
1
+ {
2
+ services . redshift = {
3
+ enable = true ;
4
+ provider = "manual" ;
5
+ latitude = 0.0 ;
6
+ longitude = "0.0" ;
7
+ settings = {
8
+ redshift = {
9
+ adjustment-method = "randr" ;
10
+ gamma = 0.8 ;
11
+ } ;
12
+ randr = { screen = 0 ; } ;
13
+ } ;
14
+ tray = true ;
15
+ } ;
16
+
17
+ nmt . script = ''
18
+ assertFileContent \
19
+ home-files/.config/redshift/redshift.conf \
20
+ ${ ./redshift-basic-configuration-file-expected.conf }
21
+ assertFileContent \
22
+ home-files/.config/systemd/user/redshift.service \
23
+ ${ ./redshift-tray-configuration-expected.service }
24
+ '' ;
25
+ }
You can’t perform that action at this time.
0 commit comments