From 5690fc1aacd31fa1f967e4c7eb4bd7522704c6c0 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 8 Jul 2024 16:02:04 +0100 Subject: [PATCH] Fix audio --- config/home.nix | 7 +------ system/shared.nix | 18 +++++++++++++----- system/vylpes-virt/configuration.nix | 13 +++++++++++++ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/config/home.nix b/config/home.nix index c436a88..8da0c2b 100644 --- a/config/home.nix +++ b/config/home.nix @@ -7,12 +7,6 @@ in { fonts.fontconfig.enable = true; - environment.variables = { - EDITOR = "nvim"; - GDK_SCALE = 0.5; - GDK_DPI_SCALE = 0.5; - }; - xdg = { enable = true; userDirs = { @@ -55,6 +49,7 @@ in { lightdm lua meslo-lgs-nf + mpv neovim networkmanager nextcloud-client diff --git a/system/shared.nix b/system/shared.nix index 0e2825b..6df1bca 100644 --- a/system/shared.nix +++ b/system/shared.nix @@ -43,10 +43,19 @@ i18n.defaultLocale = "en_GB.UTF-8"; + security.rtkit.enable = true; + services = { flatpak.enable = true; dbus.enable = true; picom.enable = true; + + pipewire = { + enable = true; + pulse.enable = true; + alsa.enable = true; + alsa.support32Bit = true; + }; xserver = { enable = true; @@ -87,9 +96,9 @@ gcm = "git commit -m"; gco = "git checkout"; - yt-mp3 = "yt-mp3 -xi --audio-format mp3"; - yt-mp3-meta = "yt-mp3 -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata"; - yt-mp3-meta-cookies = "yt-mp3 -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata --cookies-from-browser firefox"; + yt-mp3 = "yt-dlp -xi --audio-format mp3"; + yt-mp3-meta = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata"; + yt-mp3-meta-cookies = "yt-dlp -xi --audio-format mp3 --parse-metadata \"playlist_index:%(track_number)s\" --add-metadata --cookies-from-browser firefox"; }; }; @@ -115,7 +124,6 @@ environment.systemPackages = with pkgs; [ docker - pulseaudio ]; virtualisation.docker.enable = true; @@ -126,7 +134,7 @@ extraPortals = [pkgs.xdg-desktop-portal-gtk]; }; - hardware.pulseaudio.enable = true; + hardware.opengl.enable = true; system.stateVersion = "24.05"; } diff --git a/system/vylpes-virt/configuration.nix b/system/vylpes-virt/configuration.nix index 9d8a968..a7e77cf 100644 --- a/system/vylpes-virt/configuration.nix +++ b/system/vylpes-virt/configuration.nix @@ -8,4 +8,17 @@ networking = { hostName = "vylpes-virt"; }; + + services.xserver.displayManager.setupCommands = '' + ${pkgs.xorg.xrandr}/bin/xrandr -s 1920x1080 + ''; + + services.xserver.displayManager.sessionCommands = '' + ${pkgs.xorg.xrdb}/bin/xrdb -merge <