Rebase to flake parts #6
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# DDC/CI helper + i2c-dev + ddcutil (implementation under `package/`).
|
||||
{ ... }: {
|
||||
flake.nixosModules.systemMonitorInput =
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.chiasson.system.monitorInput;
|
||||
monitorInputPkg = pkgs.callPackage ./package { };
|
||||
in
|
||||
{
|
||||
options.chiasson.system.monitorInput.enable = lib.mkEnableOption ''
|
||||
`i2c-dev`, ddcutil, and `monitor-input` for DDC/CI input switching.
|
||||
'';
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.kernelModules = [ "i2c-dev" ];
|
||||
environment.systemPackages = [
|
||||
pkgs.ddcutil
|
||||
monitorInputPkg
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user