pumpkin: adb: enable
[julm/julm-nix.git] / hosts / patate / hardware.nix
index 9fd138d305e2521664fe8c0cd7fbb7db42e155cc..b4c640a14f3177643b31aad4e0598f903ae21b02 100644 (file)
@@ -1,94 +1,99 @@
-{ config, lib, pkgs, hostName, ... }:
+{ hostName, ... }:
 {
-imports = [
-  ../../nixos/profiles/hardware/X200.nix
-  ../../nixos/profiles/zfs.nix
-  ../../nixos/profiles/zramSwap.nix
-];
+  imports = [
+    ../../nixos/profiles/hardware/X200.nix
+    ../../nixos/profiles/zfs.nix
+    ../../nixos/profiles/zramSwap.nix
+  ];
 
-boot.loader.grub = {
-  enable  = true;
-  version = 2;
-  device  = "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD1";
-  configurationLimit = 3;
-};
+  boot.loader.grub = {
+    enable = true;
+    memtest86.enable = true;
+    device = "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD1";
+    configurationLimit = 3;
+  };
+  boot.zfs.requestEncryptionCredentials = [ hostName ];
 
-fileSystems."/boot" =
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
+  fileSystems."/boot" = {
+    device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
     fsType = "ext2";
   };
-fileSystems."/boot/efi" =
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
+  fileSystems."/boot/efi" = {
+    device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
     fsType = "vfat";
   };
-swapDevices = [
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
-    randomEncryption = {
-      enable = true;
-      cipher = "aes-xts-plain64";
-      source = "/dev/urandom";
-    };
-  }
-];
+  swapDevices = [
+    {
+      device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
+      randomEncryption = {
+        enable = true;
+        cipher = "aes-xts-plain64";
+        source = "/dev/urandom";
+      };
+    }
+  ];
 
-# The 32-bit host id of the host, formatted as 8 hexadecimal characters.
-# You should try to make this id unique among your hosts.
-# Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
-networking.hostId = "ec2adb40";
+  # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
+  # You should try to make this id unique among your hosts.
+  # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
+  networking.hostId = "ec2adb40";
 
-boot.supportedFilesystems = [ "ntfs" "vfat" ];
-boot.extraModulePackages = [
-  #config.boot.kernelPackages.exfat-nofuse
-];
+  boot.supportedFilesystems = [
+    "ntfs"
+    "vfat"
+  ];
+  boot.extraModulePackages = [
+    #config.boot.kernelPackages.exfat-nofuse
+  ];
 
-powerManagement.powertop.enable = true;
+  powerManagement.powertop.enable = true;
 
-fileSystems."/" =
-  { device = "${hostName}/root";
+  fileSystems."/" = {
+    device = "${hostName}/root";
     fsType = "zfs";
   };
-fileSystems."/nix" =
-  { device = "${hostName}/nix";
+  fileSystems."/nix" = {
+    device = "${hostName}/nix";
     fsType = "zfs";
   };
-fileSystems."/home/sevy" =
-  { device = "${hostName}/home";
+  fileSystems."/home/sevy" = {
+    device = "${hostName}/home";
     fsType = "zfs";
   };
-fileSystems."/home/sevy/Documents" =
-  { device = "${hostName}/home/Documents";
+  fileSystems."/home/sevy/Documents" = {
+    device = "${hostName}/home/Documents";
     fsType = "zfs";
   };
-fileSystems."/home/sevy/Images" =
-  { device = "${hostName}/home/Images";
+  fileSystems."/home/sevy/Images" = {
+    device = "${hostName}/home/Images";
     fsType = "zfs";
   };
-fileSystems."/home/sevy/Téléchargements" =
-  { device = "${hostName}/home/Downloads";
+  fileSystems."/home/sevy/Téléchargements" = {
+    device = "${hostName}/home/Downloads";
     fsType = "zfs";
   };
-fileSystems."/home/sevy/.thunderbird" =
-  { device = "${hostName}/home/Mails";
+  fileSystems."/home/sevy/.thunderbird" = {
+    device = "${hostName}/home/Mails";
     fsType = "zfs";
   };
-fileSystems."/home/sevy/Vidéos" =
-  { device = "${hostName}/home/Videos";
+  fileSystems."/home/sevy/Vidéos" = {
+    device = "${hostName}/home/Videos";
     fsType = "zfs";
   };
-fileSystems."/var" =
-  { device = "${hostName}/var";
+  fileSystems."/var" = {
+    device = "${hostName}/var";
     fsType = "zfs";
   };
-fileSystems."/var/cache" =
-  { device = "${hostName}/var/cache";
+  fileSystems."/var/cache" = {
+    device = "${hostName}/var/cache";
     fsType = "zfs";
   };
-fileSystems."/var/log" =
-  { device = "${hostName}/var/log";
+  fileSystems."/var/log" = {
+    device = "${hostName}/var/log";
     fsType = "zfs";
   };
-fileSystems."/var/tmp" =
-  { device = "${hostName}/var/tmp";
+  fileSystems."/var/tmp" = {
+    device = "${hostName}/var/tmp";
     fsType = "zfs";
   };