40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ lib, config, pkgs, hostname, gpu, ... }: {
|
|
# Enable sound with pipewire.
|
|
sound.enable = true;
|
|
hardware.pulseaudio.enable = true;
|
|
security.rtkit.enable = true;
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
alsa.support32Bit = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
# Configure keymap in X11
|
|
services.xserver = {
|
|
enable = true;
|
|
layout = "us";
|
|
xkbVariant = "";
|
|
autorun = true;
|
|
videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu;
|
|
};
|
|
|
|
##### disable nvidia, very nice battery life.
|
|
# hardware.nvidiaOptimus.disable = lib.mkDefault true;
|
|
|
|
services.xserver = {
|
|
# https://nixos.org/manual/nixos/stable/index.html#chap-gnome
|
|
# Enable the GNOME Desktop Environment.
|
|
desktopManager = {
|
|
xterm.enable = false;
|
|
xfce.enable = true;
|
|
};
|
|
displayManager.defaultSession = "xfce";
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
# Gnome relevant packages
|
|
papirus-icon-theme
|
|
dconf2nix # https://github.com/gvolpe/dconf2nix
|
|
];
|
|
}
|