[audio] Add an audio role
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
];
|
||||
|
||||
roles = {
|
||||
audio.enable = true;
|
||||
kodi = {
|
||||
enable = true;
|
||||
autologin = true;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
];
|
||||
|
||||
roles = {
|
||||
audio.enable = true;
|
||||
bluetooth.enable = true;
|
||||
desktop.enable = true;
|
||||
nfs-mounts.enable = true;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
];
|
||||
|
||||
roles = {
|
||||
audio.enable = true;
|
||||
desktop = {
|
||||
enable = true;
|
||||
x11Only = true;
|
||||
|
||||
32
roles/audio/default.nix
Normal file
32
roles/audio/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.audio;
|
||||
in
|
||||
{
|
||||
options.roles.audio = {
|
||||
enable = mkEnableOption "Enable the audio role";
|
||||
};
|
||||
|
||||
config =
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
paprefs
|
||||
pavucontrol
|
||||
pulsemixer
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
||||
hardware.pulseaudio.extraConfig = "
|
||||
load-module module-combine-sink
|
||||
load-module module-switch-on-connect
|
||||
";
|
||||
};
|
||||
|
||||
}
|
||||
@@ -21,12 +21,6 @@ in
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
||||
hardware.pulseaudio.extraConfig = "
|
||||
load-module module-combine-sink
|
||||
load-module module-switch-on-connect
|
||||
";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ let
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./audio
|
||||
./bluetooth
|
||||
./desktop
|
||||
./kodi
|
||||
@@ -38,11 +39,6 @@ in
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
git
|
||||
|
||||
Reference in New Issue
Block a user