diff --git a/nixos/config/casper.nix b/nixos/config/casper.nix index 622e5e4..d795d69 100644 --- a/nixos/config/casper.nix +++ b/nixos/config/casper.nix @@ -1,3 +1,12 @@ { self, ... }: { lib, config, pkgs, ... }: { imports = with self.nixosModules; [ magi ]; + + ephemeral = { + enable = true; + device = "UUID=545bcd08-9f1a-4f42-b85e-93c47d496ac3"; + boot = { + device = "UUID=A5AE-22E8"; + fsType = "vfat"; + }; + }; } diff --git a/nixos/module/magi.nix b/nixos/module/magi.nix index 6d9e678..d80e6a1 100644 --- a/nixos/module/magi.nix +++ b/nixos/module/magi.nix @@ -1,10 +1,20 @@ { self, ... }: { lib, config, pkgs, ... }: { imports = with self.nixosModules; [ default + headless mimalloc physical ]; + boot.binfmt = { + emulatedSystems = [ "aarch64-linux" "riscv64-linux" ]; + preferStaticEmulators = true; + }; + + boot.kernelParams = [ + "hugepagesz=1G" "hugepages=16" + ]; + boot.kernelPackages = let inherit (self.packages.x86_64-linux) linux-hardened; in pkgs.linuxPackagesFor (linux-hardened.override { @@ -38,6 +48,10 @@ SATA_MOBILE_LPM_POLICY = 1; ATA_SFF = false; + BLK_DEV_MD = true; + MD_AUTODETECT = true; + MD_RAID1 = true; + BNXT = true; BNXT_FLOWER_OFFLOAD = true; BNXT_HWMON = true; @@ -89,11 +103,12 @@ }); }); - ephemeral = { - device = "nodev"; - boot = { - device = "nodev"; - fsType = "vfat"; + hardware.nitrokey.enable = true; + + nix = { + settings = { + system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ] + ++ (map (arch: "gccarch-${arch}") (lib.systems.inferiors.znver2 ++ [ "rv64imac" "rv64imacfd" "rv64gc" "armv8-a" ])); }; }; }