mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
fix(lint): nixfmt the whole tree
This commit is contained in:
parent
643b136863
commit
bf219a30c2
69 changed files with 2605 additions and 1726 deletions
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.aviallon.desktop;
|
||||
|
|
@ -8,26 +13,31 @@ let
|
|||
noiseFilterStrength = cfg.audio.noise-filter.strength;
|
||||
};
|
||||
|
||||
airplayConfig = pkgs.callPackage ./pipewire/pipewire-airplay.conf.nix {};
|
||||
airplayConfig = pkgs.callPackage ./pipewire/pipewire-airplay.conf.nix { };
|
||||
|
||||
# Multimedia Packages
|
||||
|
||||
ffmpeg-full-unfree = let
|
||||
withUnfree = pkgs.unstable.ffmpeg-full.override {
|
||||
withUnfree = true;
|
||||
withTensorflow = false;
|
||||
};
|
||||
in withUnfree;
|
||||
|
||||
in {
|
||||
ffmpeg-full-unfree =
|
||||
let
|
||||
withUnfree = pkgs.unstable.ffmpeg-full.override {
|
||||
withUnfree = true;
|
||||
withTensorflow = false;
|
||||
};
|
||||
in
|
||||
withUnfree;
|
||||
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.enable && !generalCfg.minimal) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
ffmpeg-full-unfree
|
||||
krita
|
||||
(pkgs.wrapOBS { plugins = with obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture
|
||||
]; })
|
||||
|
||||
(pkgs.wrapOBS {
|
||||
plugins = with obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
})
|
||||
|
||||
#scribus
|
||||
yt-dlp
|
||||
#jellyfin-media-player # https://github.com/NixOS/nixpkgs/issues/437865 https://github.com/jellyfin/jellyfin-media-player/issues/282
|
||||
|
|
@ -36,10 +46,11 @@ in {
|
|||
#jamesdsp # Audio post-processing
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [(final: prev: {
|
||||
inherit ffmpeg-full-unfree;
|
||||
})];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
inherit ffmpeg-full-unfree;
|
||||
})
|
||||
];
|
||||
|
||||
# Enable sound.
|
||||
services.pulseaudio.enable = false;
|
||||
|
|
@ -76,9 +87,12 @@ in {
|
|||
"node.description" = "Sortie combinée";
|
||||
"combine.latency-compensate" = true;
|
||||
"combine.props" = {
|
||||
"audio.position" = [ "FL" "FR" ];
|
||||
"audio.position" = [
|
||||
"FL"
|
||||
"FR"
|
||||
];
|
||||
};
|
||||
"stream.props" = {};
|
||||
"stream.props" = { };
|
||||
"stream.rules" = [
|
||||
{
|
||||
matches = [
|
||||
|
|
@ -90,7 +104,7 @@ in {
|
|||
"media.class" = "Audio/Sink";
|
||||
}
|
||||
];
|
||||
actions.create-stream = {};
|
||||
actions.create-stream = { };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
@ -105,50 +119,61 @@ in {
|
|||
"bluez5.enable-sbc-xq" = true; # Should be default now
|
||||
"bluez5.enable-msbc" = true; # Default
|
||||
"bluez5.enable-hw-volume" = true; # Default
|
||||
"bluez5.headset-roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
"bluez5.headset-roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
security.rtkit.enable = true; # Real-time support for pipewire
|
||||
|
||||
aviallon.programs.allowUnfreeList = [
|
||||
"ffmpeg-full" # Because of unfree codecs
|
||||
];
|
||||
|
||||
|
||||
# Hardware-agnostic audio denoising
|
||||
systemd.user.services = let
|
||||
mkPipewireModule = {conf, description}: {
|
||||
unitConfig = {
|
||||
Slice = "session.slice";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = [
|
||||
"${getBin config.services.pipewire.package}/bin/pipewire -c ${conf}"
|
||||
];
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
bindsTo = [ "pipewire.service" ];
|
||||
after = [ "pipewire.service" ];
|
||||
environment = {
|
||||
PIPEWIRE_DEBUG = "3";
|
||||
};
|
||||
wantedBy = [ "pipewire.service" ];
|
||||
inherit description;
|
||||
systemd.user.services =
|
||||
let
|
||||
mkPipewireModule =
|
||||
{ conf, description }:
|
||||
{
|
||||
unitConfig = {
|
||||
Slice = "session.slice";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = [
|
||||
"${getBin config.services.pipewire.package}/bin/pipewire -c ${conf}"
|
||||
];
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
bindsTo = [ "pipewire.service" ];
|
||||
after = [ "pipewire.service" ];
|
||||
environment = {
|
||||
PIPEWIRE_DEBUG = "3";
|
||||
};
|
||||
wantedBy = [ "pipewire.service" ];
|
||||
inherit description;
|
||||
};
|
||||
in
|
||||
{
|
||||
pipewire-noise-filter = mkIf cfg.audio.noise-filter.enable (
|
||||
(mkPipewireModule {
|
||||
conf = filterConfig;
|
||||
description = "Pipewire Noise Filter";
|
||||
})
|
||||
// {
|
||||
enable = cfg.audio.noise-filter.strength > 0.0;
|
||||
}
|
||||
);
|
||||
pipewire-airplay-sink = mkIf cfg.audio.airplay.enable (mkPipewireModule {
|
||||
conf = airplayConfig;
|
||||
description = "Pipewire Airplay Sink";
|
||||
});
|
||||
};
|
||||
in {
|
||||
pipewire-noise-filter = mkIf cfg.audio.noise-filter.enable (
|
||||
(mkPipewireModule { conf = filterConfig; description = "Pipewire Noise Filter"; }) //
|
||||
{
|
||||
enable = cfg.audio.noise-filter.strength > 0.0;
|
||||
}
|
||||
);
|
||||
pipewire-airplay-sink = mkIf cfg.audio.airplay.enable (
|
||||
mkPipewireModule { conf = airplayConfig; description = "Pipewire Airplay Sink"; }
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue