summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSam <30577766+Samasaur1@users.noreply.github.com>2024-02-27 17:22:41 -0800
committerSam <30577766+Samasaur1@users.noreply.github.com>2024-02-29 22:23:40 -0800
commitee53e5785c437aa2e836c6ce3b9fbf3936bf511e (patch)
treeea48c636f8fad7b9b9cf166089c0bab75bf8e55f /modules
parent0363c18c3704c44d4a282ecbd1455b325bc37a77 (diff)
`system.startup.chime`: init
Diffstat (limited to 'modules')
-rw-r--r--modules/module-list.nix1
-rw-r--r--modules/system/startup.nix31
2 files changed, 32 insertions, 0 deletions
diff --git a/modules/module-list.nix b/modules/module-list.nix
index 66440a1..b9959c0 100644
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -38,6 +38,7 @@
./system/nvram.nix
./system/patches.nix
./system/shells.nix
+ ./system/startup.nix
./system/version.nix
./time
./networking
diff --git a/modules/system/startup.nix b/modules/system/startup.nix
new file mode 100644
index 0000000..ecbef46
--- /dev/null
+++ b/modules/system/startup.nix
@@ -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");
+ };
+}