add pkgs and overlays to nb config

This commit is contained in:
2023-08-20 14:41:04 +02:00
parent e2353a4f97
commit 7a0d60c17c
32 changed files with 8917 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.ir-toggle;
ir_toggle = pkgs.callPackage ./ir-toggle.nix { };
in {
options = {
services.ir-toggle = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable Chicony IR Emitter toggler.
'';
};
};
};
config = mkIf cfg.enable {
# Udev rules to start it on boot.
environment.systemPackages = [ ir_toggle ];
# Re-toggle the IR emitter after the sleep so that it could work perfectly
powerManagement.resumeCommands =
"${ir_toggle}/bin/chicony-ir-toggle on";
services.udev.packages = [ ir_toggle ];
};
}