]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/graphical.nix
nix: lower nix-gc CPU and IO priority
[julm/julm-nix.git] / nixos / profiles / graphical.nix
1 { pkgs, lib, config, ... }:
2 with lib;
3 {
4 console.useXkbConfig = mkDefault true;
5 environment.systemPackages = [
6 pkgs.gdk-pixbuf.dev # for gdk-pixbuf-query-loaders
7 pkgs.paprefs
8 pkgs.pulseaudio # for pactl when using pipewire
9 ];
10
11 # Improve desktop responsiveness when updating the system.
12 nix.daemonCPUSchedPolicy = "idle";
13
14 # rtkit is optional but recommended
15 security.rtkit.enable = mkDefault config.services.pipewire.enable;
16 hardware.pulseaudio.enable = false;
17 services.pipewire = {
18 enable = true;
19 alsa.enable = mkDefault true;
20 alsa.support32Bit = mkDefault true;
21 pulse.enable = mkDefault true;
22 };
23
24 # Allow members of the "adbusers" group to mount Android devices via MTP.
25 programs.adb.enable = true;
26 programs.dconf.enable = true;
27 services.dbus.packages = [ pkgs.dconf ];
28 services.gvfs.enable = mkDefault true;
29 services.avahi.enable = mkDefault true;
30
31 services.xserver = {
32 enable = mkDefault true;
33 libinput.enable = mkDefault true;
34 exportConfiguration = mkDefault true; # link /usr/share/X11/ properly
35 desktopManager = {
36 session = [
37 # Add a session generated by home-manager
38 {
39 name = "home-manager";
40 start = ''
41 ${pkgs.runtimeShell} $HOME/.hm-xsession &
42 waitPID=$!
43 '';
44 }
45 ];
46 xterm.enable = mkDefault false;
47 };
48 displayManager.autoLogin.enable = mkDefault true;
49 };
50
51 services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
52 }