modules: add sound
I will probably want to share this configuration between multiple machines in the future.
This commit is contained in:
parent
406eeea9f6
commit
a508db48c9
|
@ -12,6 +12,7 @@
|
|||
./networking.nix
|
||||
./nix.nix
|
||||
./packages.nix
|
||||
./sound.nix
|
||||
./upower.nix
|
||||
./users.nix
|
||||
];
|
||||
|
|
25
modules/sound.nix
Normal file
25
modules/sound.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.modules.sound;
|
||||
in
|
||||
{
|
||||
options.my.modules.sound = with lib; {
|
||||
enable = mkEnableOption "sound configuration";
|
||||
|
||||
pulse = {
|
||||
enable = mkEnableOption "pulseaudio configuration";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
# Basic configuration
|
||||
{
|
||||
sound.enable = true;
|
||||
}
|
||||
|
||||
# Pulseaudio setup
|
||||
(lib.mkIf cfg.pulse.enable {
|
||||
hardware.pulseaudio.enable = true;
|
||||
})
|
||||
]);
|
||||
}
|
Loading…
Reference in a new issue