mio-ops/roles/desktop_common.nix
2020-12-31 11:55:41 +10:00

131 lines
3.4 KiB
Nix

# Common configuration for MIO desktops
{ config, pkgs, ... }:
{
imports =
[
../roles/games-kids.nix
../roles/host_common.nix
../roles/daedalus.nix
../roles/openssh.nix
../secrets/user-craige.nix
../secrets/user-fiona.nix
../secrets/user-hamish.nix
../secrets/user-logan.nix
../secrets/user-root.nix
../secrets/user-xander.nix
];
# Common Desktop Packages
environment.systemPackages = with pkgs; [
brave # Privacy-oriented browser
google-chrome # A freeware web browser developed by Google
chromium
element-desktop # A feature-rich client for Matrix.org
firefoxWrapper # install Firefox with support for plugins
gnome3.gnome-tweaks # A tool to customize advanced GNOME 3 options
libreoffice-fresh
mplayer # A movie player that supports many video formats
shotwell # Photo organizer
usbutils # Tools for working with USB devices, such as lsusb
user-manager
nextcloud-client # Nextcloud desktop client
xorg.libxcb # X C binding
];
networking.networkmanager.enable = true; # Enables network support via NetworkManager.
# Enable common desktop services
services = {
acpid.enable = true; # A daemon for delivering ACPI events to userspace programs
blueman.enable = true; # GTK-based Bluetooth Manager
devmon.enable = true; # Enable external device automounting.`
udev.packages = [
pkgs.android-udev-rules # Android udev rules list
];
udisks2.enable = true; # Enable udisks2
xserver = {
enable = true;
desktopManager = {
gnome3.enable = true; # Enable GNOME desktop environment
};
displayManager = {
defaultSession = "gnome"; # Set GNOME as the default session
gdm.enable = true; # Enable the GNOME display manager
};
libinput.enable = true; # Enable touchpad support.
};
};
powerManagement.enable = true;
sound.enable = true; # Enable sound.
# Configure common hardware settings
hardware = {
pulseaudio = {
enable = true;
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
};
bluetooth = {
enable = true; # Enable bluetooth
config = {
General = {
Enable = "Source,Sink,Media,Socket";
};
Policy = {
AutoEnable = "true";
};
};
};
opengl.enable = true;
};
# Configure Firefox and Chromium
nixpkgs.config = {
allowUnfree = true;
firefox = {
enableAdobeFlash = false; # Disabled because Adobe Flash is just rubbish
};
chromium = {
enablePepperFlash = false; # Chromium's non-NSAPI alternative to Adobe Flash
};
};
programs = {
chromium = {
enable = true;
homepageLocation = "https://start.duckduckgo.com/";
};
};
# Groups to add
users.groups = {
audio.members = [
"craige"
"fiona"
"hamish"
"logan"
"xander"
];
libvirtd.members = [
"craige"
"fiona"
"hamish"
"logan"
"xander"
];
networkmanager.members = [
"craige"
"fiona"
"hamish"
"logan"
"xander"
];
};
}