mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-12-23 02:36:05 +01:00
refactor: audio.nix
This commit is contained in:
parent
126004273f
commit
f31c1ae0e0
33
modules/audio.nix
Normal file
33
modules/audio.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ lib, config, options, pkgs, modulesPath, ... }:
|
||||
#with lib;
|
||||
#let
|
||||
# cfg = config.yoda.audio;
|
||||
#in
|
||||
#{
|
||||
# options = {
|
||||
# yoda.audio = {
|
||||
# enable = mkEnableOption "Sound with pipewire";
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# config = mkIf cfg.enable
|
||||
{
|
||||
# Enable sound with pipewire.
|
||||
# https://github.com/tolgaerok/nixos-kde/blob/main/core/system/audio/default.nix
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this.
|
||||
#jack.enable = true;
|
||||
|
||||
# Use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
#};
|
||||
}
|
@ -1,5 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# GNOME desktop environment.
|
||||
# If the theme or other settings are broken after switching to GNOME from e.g. KDE, resetting settings can help:
|
||||
# dconf reset -f / && reboot
|
||||
# See also: kde.nix
|
||||
|
||||
imports = [
|
||||
./audio.nix
|
||||
];
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
# Exclude xterm.
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Enable the GNOME desktop environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
# Toggles, weather the Wayland or X11 GNOME session is started.
|
||||
services.xserver.displayManager.gdm.wayland = false;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Don't install all programs of the GNOME desktop.
|
||||
# https://nixos.wiki/wiki/GNOME#Excluding_some_GNOME_applications_from_the_default_install
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
@ -19,43 +39,11 @@
|
||||
gnome.gnome-system-monitor # Resource monitor / task manager
|
||||
gnome.totem # Video player
|
||||
]);
|
||||
|
||||
# GNOME Calendar comes preinstalled. https://nixos.wiki/wiki/GNOME/Calendar
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
# Exclude xterm.
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
# Toggles, weather the Wayland or X11 GNOME session is started.
|
||||
services.xserver.displayManager.gdm.wayland = false;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Configure keymap in X11.
|
||||
services.xserver = {
|
||||
layout = "de";
|
||||
xkbVariant = "nodeadkeys";
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this.
|
||||
#jack.enable = true;
|
||||
|
||||
# Use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user