mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
profiles/desktop: init audio.pipewire submodule
This commit is contained in:
parent
b9294d8f39
commit
b9fbcc958a
@ -1,13 +1,29 @@
|
|||||||
# Enables all of my usual setup for desktop-oriented stuff.
|
# Enables all of my usual setup for desktop-oriented stuff.
|
||||||
{ config, lib, pkgs, ... }@attrs:
|
{ config, lib, pkgs, ... }@attrs:
|
||||||
|
|
||||||
let cfg = config.profiles.desktop;
|
let
|
||||||
|
cfg = config.profiles.desktop;
|
||||||
|
nixosCfg = attrs.osConfig;
|
||||||
|
nixosPipewireCfg = nixosCfg.services.pipewire;
|
||||||
|
hasNixOSPipewireService = attrs ? osConfig -> nixosPipewireCfg.enable;
|
||||||
in {
|
in {
|
||||||
options.profiles.desktop = {
|
options.profiles.desktop = {
|
||||||
enable = lib.mkEnableOption "installations of desktop apps";
|
enable = lib.mkEnableOption "installations of desktop apps";
|
||||||
graphics.enable =
|
graphics.enable =
|
||||||
lib.mkEnableOption "installations of graphics-related apps";
|
lib.mkEnableOption "installations of graphics-related apps";
|
||||||
audio.enable = lib.mkEnableOption "installations of audio-related apps";
|
audio = {
|
||||||
|
enable = lib.mkEnableOption "installations of audio-related apps";
|
||||||
|
pipewire.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = hasNixOSPipewireService;
|
||||||
|
description = ''
|
||||||
|
Enable whether to install Pipewire-related applications.
|
||||||
|
|
||||||
|
This module is implicitly enabled if used as part of the NixOS
|
||||||
|
configuration and has Pipewire service enabled.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
video.enable = lib.mkEnableOption "installations of video-related apps";
|
video.enable = lib.mkEnableOption "installations of video-related apps";
|
||||||
documents.enable =
|
documents.enable =
|
||||||
lib.mkEnableOption "installations for document-related apps";
|
lib.mkEnableOption "installations for document-related apps";
|
||||||
@ -42,16 +58,20 @@ in {
|
|||||||
yabridgectl # The bridge controller.
|
yabridgectl # The bridge controller.
|
||||||
|
|
||||||
ffmpeg-full # Ah yes, everyman's multimedia swiss army knife.
|
ffmpeg-full # Ah yes, everyman's multimedia swiss army knife.
|
||||||
helvum # The Pipewire Patchbay.
|
|
||||||
carla # The Carla Carla.
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
(lib.mkIf cfg.audio.pipewire.enable {
|
||||||
# This is assuming you're using Pipewire, yes?
|
# This is assuming you're using Pipewire, yes?
|
||||||
services.easyeffects.enable = true;
|
services.easyeffects.enable = true;
|
||||||
services.fluidsynth = {
|
services.fluidsynth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
soundService = "pipewire-pulse";
|
soundService = lib.mkIf nixosPipewireCfg.pulse.enable "pipewire-pulse";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
helvum # The Pipewire Patchbay.
|
||||||
|
carla # The Carla Carla.
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
(lib.mkIf cfg.video.enable {
|
(lib.mkIf cfg.video.enable {
|
||||||
|
@ -26,7 +26,10 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Enable the desktop audio profile for extra auditorial goodies.
|
# Enable the desktop audio profile for extra auditorial goodies.
|
||||||
profiles.desktop.audio.enable = lib.mkDefault true;
|
profiles.desktop.audio = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
pipewire.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
# My music player setup, completely configured with Nix!
|
# My music player setup, completely configured with Nix!
|
||||||
programs.beets = {
|
programs.beets = {
|
||||||
|
Loading…
Reference in New Issue
Block a user