-{ pkgs, config, hostName, ... }:
+{ pkgs, lib, config, hostName, ... }:
+with lib;
{
imports = [
../../nixos/profiles/hardware/T480.nix
../../nixos/profiles/zfs.nix
../../nixos/profiles/zramSwap.nix
+ #hardware/nvidia.nix
];
# Setting the machine-id avoids to reencrypt all credentials
# Manually generated with : uuidgen | head -c8
networking.hostId = "e6eba6c4";
+ boot.kernelParams = [
+ #"boot.trace"
+ "boot.shell_on_fail"
+ #"boot.debug1"
+ ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
-
boot.loader = {
efi = {
canTouchEfiVariables = true;
- efiSysMountPoint = "/boot/efi";
+ efiSysMountPoint = "/boot1";
};
systemd-boot = {
enable = true;
# FIXME: needs https://github.com/NixOS/nixpkgs/pull/246897
#mirroredBoots = [ ];
};
-
- #generationsDir.copyKernels = true;
};
+ boot.zfs.requestEncryptionCredentials = [ "${hostName}/root" ];
hardware.enableRedistributableFirmware = true;
+ # Disable IR camera
+ services.udev.extraRules = ''
+ ACTION=="add", ATTRS{idVendor}=="5986", ATTRS{idProduct}=="1141", RUN="${pkgs.runtimeShell} -c 'echo 1 >/sys$devpath/remove'"
+ '';
- fileSystems."/boot/efi" =
+ fileSystems."/boot1" =
{
- device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
+ device = "/dev/disk/by-partlabel/${hostName}_ssd1_boot";
fsType = "vfat";
options = [ "rw" "noexec" "nodev" "nofail" "X-mount.mkdir" "iocharset=iso8859-1" ];
};
swapDevices = [
{
- device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
+ device = "/dev/disk/by-partlabel/${hostName}_ssd1_swap";
randomEncryption = {
enable = true;
cipher = "aes-xts-plain64";