dotfiles/nixos/hosts/pike/default.nix
2024-11-07 16:25:41 -07:00

109 lines
2.6 KiB
Nix

#
# Per-system configuration for Pike.
#
# vim: et:ts=2:sw=2:
#
{
config,
deprekages,
pkgs,
lib,
modulesPath,
...
}:
{
system.stateVersion = "23.11";
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Networking.
networking.hostName = "pike";
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;
# Fingerprint reader!
services.fprintd.enable = true;
#
# Rotate the screen.
#
boot.kernelParams = [ "fbcon=rotate:1" ];
# Wayland+weston doesn't seem to rotate properly, so we'll run SDDM on X.
services.displayManager.sddm.wayland.enable = lib.mkForce false;
services.xserver = {
enable = true;
displayManager = {
# Rotate SDDM.
setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DSI-1 --auto --rotate right;
'';
};
};
#
# Niri configuration.
#
home-manager.users.deprekated.programs.niri.settings = {
outputs."DSI-1".transform.rotation = 270;
input.touchpad = {
tap = false;
};
};
# Override stylix font sizes.
stylix.fonts.sizes.desktop = lib.mkForce 12;
#
# Hardware config.
#
boot.initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
services.hardware.bolt.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/d1b23c80-a9d3-4142-a26f-2318018d767d";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0958-3417";
fsType = "vfat";
};
swapDevices = [ ];
# 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.enp175s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp174s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}