Merge release-21.05 into staging-next-21.05
This commit is contained in:
commit
c5c692a1cc
@ -383,6 +383,7 @@
|
|||||||
./services/hardware/bluetooth.nix
|
./services/hardware/bluetooth.nix
|
||||||
./services/hardware/bolt.nix
|
./services/hardware/bolt.nix
|
||||||
./services/hardware/brltty.nix
|
./services/hardware/brltty.nix
|
||||||
|
./services/hardware/ddccontrol.nix
|
||||||
./services/hardware/fancontrol.nix
|
./services/hardware/fancontrol.nix
|
||||||
./services/hardware/freefall.nix
|
./services/hardware/freefall.nix
|
||||||
./services/hardware/fwupd.nix
|
./services/hardware/fwupd.nix
|
||||||
|
36
nixos/modules/services/hardware/ddccontrol.nix
Normal file
36
nixos/modules/services/hardware/ddccontrol.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{ config
|
||||||
|
, lib
|
||||||
|
, pkgs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.ddccontrol;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services.ddccontrol = {
|
||||||
|
enable = lib.mkEnableOption "ddccontrol for controlling displays";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Give users access to the "gddccontrol" tool
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.ddccontrol
|
||||||
|
];
|
||||||
|
|
||||||
|
services.dbus.packages = [
|
||||||
|
pkgs.ddccontrol
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.packages = [
|
||||||
|
pkgs.ddccontrol
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -34,6 +34,10 @@ stdenv.mkDerivation rec {
|
|||||||
ddccontrol-db
|
ddccontrol-db
|
||||||
];
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
||||||
|
];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
oldPath="\$""{datadir}/ddccontrol-db"
|
oldPath="\$""{datadir}/ddccontrol-db"
|
||||||
newPath="${ddccontrol-db}/share/ddccontrol-db"
|
newPath="${ddccontrol-db}/share/ddccontrol-db"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user