fcitx5: tweak classicui settings
[julm/julm-nix.git] / hosts / courge / hardware.nix
index dff5f5fae39bcac83b31b773626fe601d453a2bc..b07f2c0d2d966472936bf29e9280c5b19ea6eba2 100644 (file)
@@ -1,4 +1,10 @@
-{ pkgs, lib, config, hostName, ... }:
+{
+  pkgs,
+  lib,
+  config,
+  hostName,
+  ...
+}:
 with lib;
 {
   imports = [
@@ -23,7 +29,8 @@ with lib;
     "boot.shell_on_fail"
     #"boot.debug1"
   ];
-  boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
+  # Deprecated in nixos-24.11
+  #boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
   boot.loader = {
     efi = {
       canTouchEfiVariables = true;
@@ -36,10 +43,10 @@ with lib;
       configurationLimit = 6;
       memtest86.enable = true;
       /*
-      extraInstallCommands = ''
-        rm -rf /efiboot/efi2
-        cp -r /efiboot/efi1 /efiboot/efi2
-      '';
+        extraInstallCommands = ''
+          rm -rf /efiboot/efi2
+          cp -r /efiboot/efi1 /efiboot/efi2
+        '';
       */
       # FIXME: needs https://github.com/NixOS/nixpkgs/pull/246897
       #mirroredBoots = [ ];
@@ -48,13 +55,23 @@ with lib;
   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."/boot1" =
-    {
-      device = "/dev/disk/by-partlabel/${hostName}_ssd1_boot";
-      fsType = "vfat";
-      options = [ "rw" "noexec" "nodev" "nofail" "X-mount.mkdir" "iocharset=iso8859-1" ];
-    };
+  fileSystems."/boot1" = {
+    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}_ssd1_swap";
@@ -66,26 +83,32 @@ with lib;
     }
   ];
 
-  boot.supportedFilesystems = [ "ntfs" "vfat" ];
+  boot.supportedFilesystems = [
+    "ntfs"
+    "vfat"
+  ];
 
-  fileSystems."/" =
-    {
-      device = "${hostName}/root";
-      fsType = "zfs";
-      options = [ "zfsutil" ];
-    };
-  fileSystems."/nix" =
-    {
-      device = "${hostName}/root/nix";
-      fsType = "zfs";
-      options = [ "X-mount.mkdir" "zfsutil" ];
-    };
-  fileSystems."/var" =
-    {
-      device = "${hostName}/root/var";
-      fsType = "zfs";
-      options = [ "X-mount.mkdir" "zfsutil" ];
-    };
+  fileSystems."/" = {
+    device = "${hostName}/root";
+    fsType = "zfs";
+    options = [ "zfsutil" ];
+  };
+  fileSystems."/nix" = {
+    device = "${hostName}/root/nix";
+    fsType = "zfs";
+    options = [
+      "X-mount.mkdir"
+      "zfsutil"
+    ];
+  };
+  fileSystems."/var" = {
+    device = "${hostName}/root/var";
+    fsType = "zfs";
+    options = [
+      "X-mount.mkdir"
+      "zfsutil"
+    ];
+  };
 
   services.pipewire.jack.enable = true;