nix: remove upstreamed PR patches
[sourcephile-nix.git] / servers / mermet / production / apu2e4.nix
index dff97712a271240e9294611c42cc7fec5e8a8e9a..d317b15c83a147d27a6620cc2ea36ed24d42f329 100644 (file)
@@ -1,93 +1,30 @@
 { pkgs, lib, config, ... }:
 {
-  hardware.cpu.amd.updateMicrocode = true;
+imports = [
+  ../../../base/apu2e4.nix
+];
 
-  boot.kernel = {
-    sysctl = {
-      "vm.swappiness" = 10;
-      "vm.vfs_cache_pressure" = 50;
-    };
-  };
+boot.loader.grub.devices = [
+  "/dev/disk/by-id/ata-Samsung_SSD_840_EVO_250GB_S1DBNSAF340110R"
+];
 
-  boot.loader = {
-    grub = {
-      enable = true;
-      version = 2;
-      copyKernels = true;
-      # efiSupport = true;
-      devices = [
-        "/dev/disk/by-id/ata-Samsung_SSD_840_EVO_250GB_S1DBNSAF340110R"
-      ];
-      /*
-      mirroredBoots = [
-        { devices = [ "${disk_id}" ];
-          path    = "/boot${bootnum}";
-        }
-      ];
-      */
-    };
-    /*
-    efi = {
-      canTouchEfiVariables = true;
-      efiSysMountPoint = "/boot/efi";
-      efiInstallAsRemovable = false;
-    };
-    */
+fileSystems."/boot" =
+  { device = "/dev/disk/by-uuid/dc3c5387-17d2-43b3-bfa2-bf73afacca07";
+    fsType = "ext2";
   };
 
-  boot.initrd = {
-    availableKernelModules = [
-      "ahci"
-      "ehci_pci"
-      "sd_mod"
-      "uas"
-      # Ethernet driver
-      "igb"
-      # Made the AES modules available at initrd,
-      # to speedup the deciphering of the root.
-      "aes_x86_64"
-      "aesni_intel"
-      "cryptd"
-    ];
-    kernelModules = [ ];
-
+fileSystems."/boot/efi" =
+  { device = "/dev/disk/by-uuid/62E6-E65F";
+    fsType = "vfat";
   };
-  boot.kernelModules = [ ];
-  boot.extraModulePackages = [ ];
-  boot.kernelParams = [
-    "gfxpayload=text"
-    #"console=tty0"
-    "console=ttyS0,115200n8"
-    "zfs.zfs_arc_max=262144000" # 250Mo
-  ];
-
-  fileSystems."/boot" =
-    { device = "/dev/disk/by-uuid/dc3c5387-17d2-43b3-bfa2-bf73afacca07";
-      fsType = "ext2";
-    };
-
-  fileSystems."/boot/efi" =
-    { device = "/dev/disk/by-uuid/62E6-E65F";
-      fsType = "vfat";
-    };
 
-  swapDevices =
-    [ { device = "/dev/disk/by-partuuid/6b1eaa35-776b-4e60-b21e-7bcee535dd8b";
-        randomEncryption = {
-          enable = true;
-          cipher = "aes-xts-plain64";
-          source = "/dev/urandom";
-        };
-      }
-    ];
-
-  nix.maxJobs = lib.mkDefault 4;
-  powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
-
-  environment = {
-    systemPackages = with pkgs; [
-      pciutils
-      flashrom
-    ];
-  };
+swapDevices =
+  [ { device = "/dev/disk/by-partuuid/6b1eaa35-776b-4e60-b21e-7bcee535dd8b";
+      randomEncryption = {
+        enable = true;
+        cipher = "aes-xts-plain64";
+        source = "/dev/urandom";
+      };
+    }
+  ];
 }