redshift/gammastep: use ini file
Not every option is exposed by redshift/gammastep parameters, for example gamma options are only exposed in configuration file. So this PR refactors this module to generate a configuration file and pass it to the redshift/gammastep using -c parameter. This is a breaking change since there is no support for some of the older options like `extraOptions`, but unless you use `extraOptions` it should work without changes.
This commit is contained in:
parent
ef4370bedc
commit
d8dd2a09b0
10 changed files with 177 additions and 64 deletions
|
|
@ -2,7 +2,7 @@
|
|||
WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@gammastep@/bin/gammastep -l 0.0:0.0 -t 5500:3700 -b 1:1
|
||||
ExecStart=@gammastep@/bin/gammastep -v -c /home/hm-user/.config/gammastep/config.ini
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
[general]
|
||||
adjustment-method=randr
|
||||
dawn-time=6:00-7:45
|
||||
dusk-time=18:35-20:15
|
||||
gamma=0.800000
|
||||
location-provider=manual
|
||||
temp-day=5500
|
||||
temp-night=3700
|
||||
|
||||
[manual]
|
||||
|
||||
[randr]
|
||||
screen=0
|
||||
|
|
@ -5,8 +5,15 @@
|
|||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "manual";
|
||||
latitude = "0.0";
|
||||
longitude = "0.0";
|
||||
dawnTime = "6:00-7:45";
|
||||
duskTime = "18:35-20:15";
|
||||
settings = {
|
||||
general = {
|
||||
adjustment-method = "randr";
|
||||
gamma = 0.8;
|
||||
};
|
||||
randr = { screen = 0; };
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
|
@ -18,6 +25,9 @@
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/gammastep/config.ini \
|
||||
${./gammastep-basic-configuration-file-expected.conf}
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/gammastep.service \
|
||||
${./gammastep-basic-configuration-expected.service}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@redshift@/bin/redshift -l 0.0:0.0 -t 5500:3700 -b 1:1
|
||||
ExecStart=@redshift@/bin/redshift -v -c /home/hm-user/.config/redshift/redshift.conf
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
[manual]
|
||||
lat=0.000000
|
||||
lon=0.0
|
||||
|
||||
[randr]
|
||||
screen=0
|
||||
|
||||
[redshift]
|
||||
adjustment-method=randr
|
||||
gamma=0.800000
|
||||
location-provider=manual
|
||||
temp-day=5500
|
||||
temp-night=3700
|
||||
|
|
@ -5,8 +5,15 @@
|
|||
services.redshift = {
|
||||
enable = true;
|
||||
provider = "manual";
|
||||
latitude = "0.0";
|
||||
latitude = 0.0;
|
||||
longitude = "0.0";
|
||||
settings = {
|
||||
redshift = {
|
||||
adjustment-method = "randr";
|
||||
gamma = 0.8;
|
||||
};
|
||||
randr = { screen = 0; };
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
|
@ -18,6 +25,9 @@
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/redshift/redshift.conf \
|
||||
${./redshift-basic-configuration-file-expected.conf}
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/redshift.service \
|
||||
${./redshift-basic-configuration-expected.service}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue