bash: fix ffmpeg-audio
[julm/julm-nix.git] / hosts / patate / hardware.nix
index 9fd138d305e2521664fe8c0cd7fbb7db42e155cc..6b6bd89b50d872eaa9401fdb7872c5e72ee7add5 100644 (file)
-{ 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;
-};
-
-fileSystems."/boot" =
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
-    fsType = "ext2";
-  };
-fileSystems."/boot/efi" =
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
-    fsType = "vfat";
+  boot.loader.grub = {
+    enable = true;
+    memtest86.enable = true;
+    device = "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD1";
+    configurationLimit = 3;
   };
-swapDevices = [
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
-    randomEncryption = {
-      enable = true;
-      cipher = "aes-xts-plain64";
-      source = "/dev/urandom";
+  boot.zfs.requestEncryptionCredentials = [ hostName ];
+
+  fileSystems."/boot" =
+    {
+      device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
+      fsType = "ext2";
+    };
+  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";
+      };
+    }
+  ];
 
-# 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";
-    fsType = "zfs";
-  };
-fileSystems."/nix" =
-  { device = "${hostName}/nix";
-    fsType = "zfs";
-  };
-fileSystems."/home/sevy" =
-  { device = "${hostName}/home";
-    fsType = "zfs";
-  };
-fileSystems."/home/sevy/Documents" =
-  { device = "${hostName}/home/Documents";
-    fsType = "zfs";
-  };
-fileSystems."/home/sevy/Images" =
-  { device = "${hostName}/home/Images";
-    fsType = "zfs";
-  };
-fileSystems."/home/sevy/Téléchargements" =
-  { device = "${hostName}/home/Downloads";
-    fsType = "zfs";
-  };
-fileSystems."/home/sevy/.thunderbird" =
-  { device = "${hostName}/home/Mails";
-    fsType = "zfs";
-  };
-fileSystems."/home/sevy/Vidéos" =
-  { device = "${hostName}/home/Videos";
-    fsType = "zfs";
-  };
-fileSystems."/var" =
-  { device = "${hostName}/var";
-    fsType = "zfs";
-  };
-fileSystems."/var/cache" =
-  { device = "${hostName}/var/cache";
-    fsType = "zfs";
-  };
-fileSystems."/var/log" =
-  { device = "${hostName}/var/log";
-    fsType = "zfs";
-  };
-fileSystems."/var/tmp" =
-  { device = "${hostName}/var/tmp";
-    fsType = "zfs";
-  };
+  fileSystems."/" =
+    {
+      device = "${hostName}/root";
+      fsType = "zfs";
+    };
+  fileSystems."/nix" =
+    {
+      device = "${hostName}/nix";
+      fsType = "zfs";
+    };
+  fileSystems."/home/sevy" =
+    {
+      device = "${hostName}/home";
+      fsType = "zfs";
+    };
+  fileSystems."/home/sevy/Documents" =
+    {
+      device = "${hostName}/home/Documents";
+      fsType = "zfs";
+    };
+  fileSystems."/home/sevy/Images" =
+    {
+      device = "${hostName}/home/Images";
+      fsType = "zfs";
+    };
+  fileSystems."/home/sevy/Téléchargements" =
+    {
+      device = "${hostName}/home/Downloads";
+      fsType = "zfs";
+    };
+  fileSystems."/home/sevy/.thunderbird" =
+    {
+      device = "${hostName}/home/Mails";
+      fsType = "zfs";
+    };
+  fileSystems."/home/sevy/Vidéos" =
+    {
+      device = "${hostName}/home/Videos";
+      fsType = "zfs";
+    };
+  fileSystems."/var" =
+    {
+      device = "${hostName}/var";
+      fsType = "zfs";
+    };
+  fileSystems."/var/cache" =
+    {
+      device = "${hostName}/var/cache";
+      fsType = "zfs";
+    };
+  fileSystems."/var/log" =
+    {
+      device = "${hostName}/var/log";
+      fsType = "zfs";
+    };
+  fileSystems."/var/tmp" =
+    {
+      device = "${hostName}/var/tmp";
+      fsType = "zfs";
+    };
 
 }