Add a night-light module

This commit is contained in:
Sven van Heugten 2026-02-13 20:39:47 +01:00
parent 5961a65af5
commit 5aab908591
2 changed files with 26 additions and 1 deletions

View file

@ -1,6 +1,7 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = outputs =
{ {
@ -19,5 +20,10 @@
buildInputs = [ pkgs.dotnet-sdk_10 ]; buildInputs = [ pkgs.dotnet-sdk_10 ];
}; };
} }
); )
// {
nixosModules = {
night-light = import ./module.nix;
};
};
} }

19
module.nix Normal file
View file

@ -0,0 +1,19 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.services.nightLight;
in
{
options.services.nightLight = {
enable = mkEnableOption "Night Light";
};
config = mkIf cfg.enable {
services.zigbee2mqtt.enable = true;
};
}