redshift/gammastep: add tests

This commit is contained in:
Thiago Kenji Okada 2021-01-23 19:07:42 -03:00
parent 6b15b03898
commit 7de0d07dd9
6 changed files with 83 additions and 0 deletions

View file

@ -100,6 +100,7 @@ import nmt {
./modules/services/fluidsynth ./modules/services/fluidsynth
./modules/services/kanshi ./modules/services/kanshi
./modules/services/lieer ./modules/services/lieer
./modules/services/redshift-gammastep
./modules/services/pbgopy ./modules/services/pbgopy
./modules/services/polybar ./modules/services/polybar
./modules/services/sxhkd ./modules/services/sxhkd

View file

@ -0,0 +1,4 @@
{
gammastep-basic-configuration = ./gammastep-basic-configuration.nix;
redshift-basic-configuration = ./redshift-basic-configuration.nix;
}

View file

@ -0,0 +1,13 @@
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@gammastep@/bin/gammastep -l 0.0:0.0 -t 5500:3700 -b 1:1
Restart=on-failure
RestartSec=3
[Unit]
After=graphical-session-pre.target
Description=Gammastep colour temperature adjuster
Documentation=https://gitlab.com/chinstrap/gammastep/
PartOf=graphical-session.target

View file

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
config = {
services.gammastep = {
enable = true;
provider = "manual";
latitude = "0.0";
longitude = "0.0";
};
nixpkgs.overlays = [
(self: super: {
gammastep = pkgs.writeScriptBin "dummy-gammastep" "" // {
outPath = "@gammastep@";
};
})
];
nmt.script = ''
assertFileContent \
home-files/.config/systemd/user/gammastep.service \
${./gammastep-basic-configuration-expected.service}
'';
};
}

View file

@ -0,0 +1,13 @@
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@redshift@/bin/redshift -l 0.0:0.0 -t 5500:3700 -b 1:1
Restart=on-failure
RestartSec=3
[Unit]
After=graphical-session-pre.target
Description=Redshift colour temperature adjuster
Documentation=http://jonls.dk/redshift/
PartOf=graphical-session.target

View file

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
config = {
services.redshift = {
enable = true;
provider = "manual";
latitude = "0.0";
longitude = "0.0";
};
nixpkgs.overlays = [
(self: super: {
redshift = pkgs.writeScriptBin "dummy-redshift" "" // {
outPath = "@redshift@";
};
})
];
nmt.script = ''
assertFileContent \
home-files/.config/systemd/user/redshift.service \
${./redshift-basic-configuration-expected.service}
'';
};
}