1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

system.startup.chime: init

This commit is contained in:
Sam 2024-02-27 17:22:41 -08:00
parent 0363c18c37
commit ee53e5785c
No known key found for this signature in database
GPG key ID: 07C4B9795517E3B4
2 changed files with 32 additions and 0 deletions

View file

@ -38,6 +38,7 @@
./system/nvram.nix
./system/patches.nix
./system/shells.nix
./system/startup.nix
./system/version.nix
./time
./networking

View file

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
let
cfg = config.system.startup;
in
{
meta.maintainers = [
lib.maintainers.samasaur or "samasaur"
];
options = {
system.startup.chime = lib.mkOption {
type = with lib.types; nullOr bool;
default = null;
example = false;
description = lib.mdDoc ''
Whether to enable the startup chime.
By default, this option does not affect your system configuration in any way.
However, this means that after it has been set once, unsetting it will not
return to the old behavior. It will allow the setting to be controlled in
System Settings, though.
'';
};
};
config = {
system.nvram.variables."StartupMute" = lib.mkIf (cfg.chime != null) (if cfg.chime then "%00" else "%01");
};
}