diff options
author | K900 <me@0upti.me> | 2024-07-15 10:33:34 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2024-07-15 10:33:34 +0300 |
commit | c3391ff0010eff82470a3ad2ca34068ff4526b88 (patch) | |
tree | 23003dc1524bc73ca51629be8ec8d9ebb0db1e8e | |
parent | 4a67ab50141fa91a2e8efe5dc33384bf4ecee35e (diff) |
nixos-alsa: remove `with lib;`, fix undefined references
-rw-r--r-- | nixos/modules/services/audio/alsa.nix | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/nixos/modules/services/audio/alsa.nix b/nixos/modules/services/audio/alsa.nix index 47cf094d8c74c..fac0012b666d4 100644 --- a/nixos/modules/services/audio/alsa.nix +++ b/nixos/modules/services/audio/alsa.nix @@ -1,15 +1,13 @@ # ALSA sound support. { config, lib, pkgs, ... }: -with lib; - { imports = [ - (mkRemovedOptionModule [ "sound" ] "The option was heavily overloaded and can be removed from most configurations.") + (lib.mkRemovedOptionModule [ "sound" ] "The option was heavily overloaded and can be removed from most configurations.") ]; - options.hardware.alsa.enablePersistence = mkOption { - type = types.bool; + options.hardware.alsa.enablePersistence = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable ALSA sound card state saving on shutdown. @@ -17,9 +15,9 @@ with lib; ''; }; - config = mkIf config.hardware.alsa.enablePersistence { + config = lib.mkIf config.hardware.alsa.enablePersistence { # ALSA provides a udev rule for restoring volume settings. - services.udev.packages = [ alsa-utils ]; + services.udev.packages = [ pkgs.alsa-utils ]; systemd.services.alsa-store = { description = "Store Sound Card State"; @@ -32,8 +30,8 @@ with lib; Type = "oneshot"; RemainAfterExit = true; ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/lib/alsa"; - ExecStart = "${alsa-utils}/sbin/alsactl restore --ignore"; - ExecStop = "${alsa-utils}/sbin/alsactl store --ignore"; + ExecStart = "${pkgs.alsa-utils}/sbin/alsactl restore --ignore"; + ExecStop = "${pkgs.alsa-utils}/sbin/alsactl store --ignore"; }; }; }; |