-
Notifications
You must be signed in to change notification settings - Fork 13
/
media-center.nix
46 lines (45 loc) · 1.14 KB
/
media-center.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ pkgs, ... }:
let
overlay = self: super: {
plex-media-player = super.plex-media-player.overrideAttrs (old: {
# the default mode is dbus, which supports shutdown/reboot/suspend via logind, but no dpms control
# x11 mode supports dpms control via xdg-screensaver
cmakeFlags = old.cmakeFlags ++ [ "-DLINUX_X11POWER=ON" ];
patches = [ ./setValue.patch ];
});
};
in {
services.pipewire.enable = false;
services.xserver = {
enable = true;
displayManager = {
autoLogin = {
enable = true;
user = "media";
};
sddm = {
enable = true;
};
sessionCommands = ''
ratpoison &
exec plexmediaplayer --fullscreen --tv > ~/.plexlogs
'';
};
};
hardware.pulseaudio = {
enable = true;
};
environment.systemPackages = with pkgs; [
plex-media-player ratpoison pavucontrol
#syncplay
mpv teamspeak_client ];
users.extraUsers.media = {
isNormalUser = true;
uid = 1100;
extraGroups = [ "audio" ];
};
networking.firewall.allowedTCPPorts = [
8060 # the plex frontend does upnp things
32433 # plex-media-player
];
}