modularise config

This commit is contained in:
Felix Schröter 2019-10-19 12:55:35 +02:00
parent ae44502f36
commit 79bba316c2
No known key found for this signature in database
GPG key ID: A12D7C9D2FD34458
28 changed files with 407 additions and 432 deletions

35
common/base-hardware.nix Normal file
View file

@ -0,0 +1,35 @@
{ config, pkgs, ... }:
{
boot.initrd.luks.devices = [
{
name = "root";
device = "/dev/disk/by-partlabel/nixos";
preLVM = true;
allowDiscards = true;
}
];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Bluetooth
hardware.bluetooth.enable = true;
hardware.bluetooth.extraConfig = "
[General]
Enable=Source,Sink,Media,Socket
";
# Sound.
sound.enable = true;
hardware.pulseaudio = {
enable = true;
support32Bit = true;
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
};
# USB devices
hardware.u2f.enable = true;
}