panacea/configuration.nix

89 lines
2.0 KiB
Nix
Raw Normal View History

2020-04-16 19:14:10 +02:00
{ config, lib, pkgs, ... }:
{
# Kernel configuration
boot = {
kernelPackages = pkgs.linuxPackages_latest;
2020-04-16 19:14:10 +02:00
kernelParams = [ "zfs.zfs_arc_max=536870912" ];
kernelModules = [ "i915" "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
supportedFilesystems = [ "zfs" ];
2020-05-08 21:53:52 +02:00
zfs.requestEncryptionCredentials = true;
2020-04-16 19:14:10 +02:00
};
# Intel CPU tweaks
2020-05-08 21:53:52 +02:00
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2020-04-16 19:14:10 +02:00
2020-05-08 21:53:52 +02:00
hardware.opengl.extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
2020-04-16 19:14:10 +02:00
# Bootloader configuration
boot.loader = {
2020-05-08 21:53:52 +02:00
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
2020-04-16 19:14:10 +02:00
configurationLimit = 50;
};
};
# Run Nix garbage collector, while avoiding compiling
nix = {
gc = {
automatic = true;
options = "--delete-older-than 14d";
};
extraOptions = ''
keep-outputs = true
gc-keep-outputs = true
'';
};
# Clean tmp directory on shutdown
boot.cleanTmpDir = true;
# Rotate logs after 7 days
services.journald.extraConfig = "SystemMaxFiles=7";
# Allow propietary software
nixpkgs.config.allowUnfree = true;
2020-04-22 22:13:03 +02:00
# Scrub zpool monthly
services.zfs.autoScrub = {
enable = true;
interval = "monthly";
};
# Set timezone and synchronize NTP
time.timeZone = "Europe/Brussels";
services.timesyncd.enable = true;
# Enable the TLP daemon
services.tlp.enable = true;
2020-05-08 21:53:52 +02:00
# NixOS version
system.stateVersion = "20.09";
# Create coolneng user
users.users.coolneng = {
isNormalUser = true;
home = "/home/coolneng";
extraGroups = [ "wheel" "video" "audio" ];
shell = "/run/current-system/sw/bin/fish";
};
# Import other configuration modules
imports = [
2020-04-24 04:08:44 +02:00
./modules/software.nix
./modules/networking.nix
2020-04-22 22:13:03 +02:00
./modules/gui.nix
2020-04-29 02:50:17 +02:00
./modules/datasync.nix
2020-05-08 21:53:52 +02:00
./modules/audio.nix
#./modules/home.nix
./modules/hardware-configuration.nix
];
2020-04-16 19:14:10 +02:00
}