-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhost.nix
68 lines (53 loc) · 1.76 KB
/
host.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{ config, lib, pkgs, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "amd_iommu=pt" "ivrs_ioapic[32]=00:14.0" "iommu=soft" ];
services.xserver.videoDrivers = [ "amdgpu" ];
services.openssh.enable=true;
hardware.cpu.amd.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.pulseaudio = {
enable = true;
# Full build needed for bluetooth support
package = pkgs.pulseaudioFull;
};
hardware.bluetooth.enable = true;
hardware.sensor.iio.enable = true;
services.upower.enable = true;
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video %S%p/brightness", RUN+="${pkgs.coreutils}/bin/chmod g+w %S%p/brightness"
'';
services.udev.path = [
pkgs.coreutils # for chgrp
];
fileSystems."/tmp" = {
fsType = "tmpfs";
device = "tmpfs";
options = [ "nosuid" "nodev" "relatime" "size=5G" ];
};
fileSystems."/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "btrfs";
};
fileSystems."/d" =
{ device = "/dev/disk/by-label/data";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 8;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.timeout = 0;
powerManagement.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
time.timeZone = "America/Bogota";
}