mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
redshift/gammastep: add tests
This commit is contained in:
parent
6b15b03898
commit
7de0d07dd9
6 changed files with 83 additions and 0 deletions
|
@ -100,6 +100,7 @@ import nmt {
|
|||
./modules/services/fluidsynth
|
||||
./modules/services/kanshi
|
||||
./modules/services/lieer
|
||||
./modules/services/redshift-gammastep
|
||||
./modules/services/pbgopy
|
||||
./modules/services/polybar
|
||||
./modules/services/sxhkd
|
||||
|
|
4
tests/modules/services/redshift-gammastep/default.nix
Normal file
4
tests/modules/services/redshift-gammastep/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
gammastep-basic-configuration = ./gammastep-basic-configuration.nix;
|
||||
redshift-basic-configuration = ./redshift-basic-configuration.nix;
|
||||
}
|
|
@ -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
|
|
@ -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}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -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
|
|
@ -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}
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue