blob: 038f45584aedc1238dd33c5b537f596e96fbbd0f (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
{pkgs, ...}: {
system.stateVersion = "25.11";
nixpkgs.hostPlatform.system = "x86_64-linux";
deploy = {
enable = true;
default = false;
ssh.host = "dribbler";
};
cynerd = {
wifiClient = true;
};
boot = {
initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
kernelModules = ["kvm-intel"];
kernelParams = ["video=eDP-1:d"]; # Disable internal display for kodi to use HDMI
};
hardware.cpu.intel.updateMicrocode = true;
cynerd.autounlock = {
"encroot" = "/dev/disk/by-uuid/f791f524-0552-487b-9bf9-5c20ca78651b";
};
fileSystems = {
"/" = {
device = "/dev/mapper/encroot";
fsType = "btrfs";
options = ["compress=lzo"];
};
"/boot" = {
device = "/dev/disk/by-uuid/7143-1EE7";
fsType = "vfat";
};
};
services.btrfs.autoScrub = {
enable = true;
fileSystems = ["/"];
};
networking = {
useNetworkd = true;
useDHCP = false;
};
systemd.network = {
networks = {
"dhcp" = {
matchConfig.Name = "enp1s0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = "yes";
};
linkConfig.RequiredForOnline = "routable";
};
"dhcp-wlan" = {
matchConfig.Name = "wlp2s0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = "yes";
};
routes = [{Metric = 1088;}];
linkConfig.RequiredForOnline = "routable";
};
};
wait-online.enable = false;
};
# Kodi
environment.systemPackages = with pkgs; [
kodi-gbm
];
hardware = {
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
intel-media-driver
libvdpau-va-gl
];
};
bluetooth.enable = true;
};
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
security.rtkit.enable = true;
#nixpkgs.config.kodi.enableAdvancedLauncher = true;
users.extraUsers.kodi = {
isNormalUser = true;
extraGroups = ["audio" "video" "input"];
};
systemd.services.kodi = {
description = "Kodi standalone (GBM)";
wantedBy = ["multi-user.target"];
conflicts = ["getty@tty1.service"];
serviceConfig = {
User = "kodi";
TTYPath = "/dev/tty1";
ExecStart = "${pkgs.kodi-gbm}/bin/kodi-standalone";
Restart = "on-abort";
StandardInput = "tty";
StandardOutput = "journal";
};
};
networking.firewall = {
allowedTCPPorts = [8080];
allowedUDPPorts = [8080];
};
}
|