mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-19 21:49:52 -07:00
feat: add musnix for realtime audio
This commit is contained in:
parent
af59cdd252
commit
ccf58bcf15
5 changed files with 68 additions and 11 deletions
|
@ -6,25 +6,53 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.liminalOS.system.audio.prod;
|
||||
forAllUsers = lib.genAttrs cfg.realtimeAudioUsers;
|
||||
in
|
||||
{
|
||||
options.liminalOS.system.audio.prod.enable = lib.mkEnableOption "audio production";
|
||||
options.liminalOS.system.audio.prod = {
|
||||
enable = lib.mkEnableOption "audio production";
|
||||
realtimeAudioUsers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of users to add to the audio group for realtime capabilities.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
liminalOS = {
|
||||
config = {
|
||||
liminalOS = lib.mkIf cfg.enable {
|
||||
programs.wine.enable = true;
|
||||
system.audio.enable = true;
|
||||
config.extraUnfreePackages = lib.mkIf config.liminalOS.config.allowUnfree [
|
||||
"reaper"
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
reaper
|
||||
yabridge
|
||||
yabridgectl
|
||||
alsa-scarlett-gui
|
||||
];
|
||||
environment.systemPackages = lib.mkIf cfg.enable (
|
||||
(with pkgs; [
|
||||
yabridge
|
||||
yabridgectl
|
||||
alsa-scarlett-gui
|
||||
])
|
||||
++ (lib.optionals config.liminalOS.config.allowUnfree [
|
||||
pkgs.reaper
|
||||
])
|
||||
);
|
||||
|
||||
liminalOS.config.extraUnfreePackages = lib.mkIf config.liminalOS.config.allowUnfree [
|
||||
"reaper"
|
||||
musnix.enable = cfg.enable;
|
||||
# PREEMPT_RT is merged into master
|
||||
musnix.kernel.realtime = false;
|
||||
|
||||
musnix.das_watchdog.enable = cfg.enable;
|
||||
musnix.alsaSeq.enable = cfg.enable;
|
||||
musnix.rtcqs.enable = cfg.enable;
|
||||
users.users = forAllUsers (_: {
|
||||
extraGroups = [ "audio" ];
|
||||
});
|
||||
|
||||
boot.kernelParams = lib.mkIf cfg.enable [
|
||||
"threadirqs"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue