168 lines
4.3 KiB
Nix
168 lines
4.3 KiB
Nix
#
|
|
# Per-system configuration for Kanbaru (Suruga).
|
|
#
|
|
# vim: et:ts=2:sw=2:
|
|
#
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
deprekages,
|
|
modulesPath,
|
|
fetchFromGitHub,
|
|
...
|
|
}:
|
|
{
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
# Bootloader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
# Networking.
|
|
networking.hostName = "kanbaru";
|
|
networking.networkmanager.enable = true;
|
|
networking.firewall.enable = false;
|
|
|
|
# This is a local machine, rather than our typical network-accesed ones.
|
|
# Run an ssh-agent locally.
|
|
programs.ssh.startAgent = true;
|
|
|
|
environment.systemPackages = [
|
|
pkgs.nvitop
|
|
];
|
|
|
|
#
|
|
# Niri configuration for our monitors.
|
|
#
|
|
home-manager.users.deprekated.programs.niri.settings = {
|
|
outputs."eDP-1".scale = 1.5;
|
|
};
|
|
|
|
# Override stylix font sizes.
|
|
stylix.fonts.sizes.desktop = lib.mkForce 18;
|
|
|
|
#
|
|
# Intel+NVIDIA / prime setup.
|
|
#
|
|
# Disable the NVIDIA GPU unless we explicitly request it.
|
|
hardware.nvidiaOptimus.disable = true;
|
|
|
|
# TEMPORARILY DISABLED DUE TO KERNEL WONK
|
|
#specialisation.optimus.configuration = {
|
|
# system.nixos.tags = [ "NVIDIA" ];
|
|
# services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
# # Set up the NVIDIA half of the GPU setup.
|
|
# # These are used only in the "enabled" configuration.
|
|
# hardware.nvidia = {
|
|
# modesetting.enable = true;
|
|
|
|
# # Prefer the open NVIDIA driver.
|
|
# open = true;
|
|
|
|
# # Enable the nvidia-settings command.
|
|
# nvidiaSettings = true;
|
|
|
|
# # Offloading setup: use GPU when asked for by command, and not otherwise.
|
|
# prime = {
|
|
# sync.enable = true;
|
|
|
|
# # Specify how to find our GPUs.
|
|
# intelBusId = "PCI:0:2:0";
|
|
# nvidiaBusId = "PCI:1:0:0";
|
|
# };
|
|
|
|
# };
|
|
|
|
# # Include the NVIDIA X11 driver.
|
|
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
|
|
|
# # Don't disable optimus on this config.
|
|
# hardware.nvidiaOptimus.disable = lib.mkForce false;
|
|
#};
|
|
|
|
# Set up the asus-on-linux services for this machine.
|
|
services.asusd = {
|
|
enable = true;
|
|
enableUserService = true;
|
|
};
|
|
|
|
# Enable fingerprint reader...
|
|
services.fprintd = {
|
|
enable = true;
|
|
|
|
# ... and use a weird Goodix-ized fork of libfprintd.
|
|
package = pkgs.fprintd.override {
|
|
libfprint = pkgs.libfprint.overrideAttrs (prev: {
|
|
|
|
# Add in the additional dependencies for the Goodix fork...
|
|
buildInputs =
|
|
prev.buildInputs
|
|
++ (with pkgs; [
|
|
cmake
|
|
openssl
|
|
]);
|
|
|
|
# ... and retarget the package to the fork.
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "infinytum";
|
|
repo = "libfprint";
|
|
rev = "de5990838c2ef8813388a48811fbccc11088475b";
|
|
hash = "sha256-XQ4jsgILvwc/HqT2ZmnIMpTezu5VedJ1RjuY0B6gcSk=";
|
|
};
|
|
|
|
# Manually null out the installCheckPhase.
|
|
installCheckPhase = "";
|
|
|
|
});
|
|
};
|
|
};
|
|
|
|
#
|
|
# Hardware config.
|
|
#
|
|
|
|
boot.initrd.availableKernelModules = [
|
|
"xhci_pci"
|
|
"vmd"
|
|
"nvme"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
];
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
# Support virtualization, thunderbolt, and poking the APCI directly. >.>
|
|
boot.kernelModules = [
|
|
"thunderbolt"
|
|
"acpi_call"
|
|
];
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ];
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-uuid/bb880b80-992f-4e56-bb80-c5c4df0ddd72";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-uuid/5B37-C691";
|
|
fsType = "vfat";
|
|
options = [
|
|
"fmask=0022"
|
|
"dmask=0022"
|
|
];
|
|
};
|
|
|
|
swapDevices = [ { device = "/dev/disk/by-uuid/50f20263-9632-439d-b57d-b9ee8f13d62b"; } ];
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
networking.useDHCP = lib.mkDefault true;
|
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
}
|