Last active
September 19, 2024 11:28
-
-
Save Mic92/0243df2a0b47bbc44ae0384de5f49aa9 to your computer and use it in GitHub Desktop.
simpleUefiSystemdBoot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, modulesPath, ... }: | |
{ imports = | |
[ ./hardware-configuration.nix | |
<nixpkgs/nixos/modules/testing/test-instrumentation.nix> | |
]; | |
networking.hostName = "thatworked"; | |
documentation.enable = false; | |
# To ensure that we can rebuild the grub configuration on the nixos-rebuild | |
system.extraDependencies = with pkgs; [ stdenvNoCC ]; | |
boot.loader.systemd-boot.enable = true; | |
boot.initrd.secrets."/etc/secret" = "/etc/nixos/secret"; | |
users.users.alice = { | |
isNormalUser = true; | |
home = "/home/alice"; | |
description = "Alice Foobar"; | |
}; | |
hardware.enableAllFirmware = lib.mkForce false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not modify this file! It was generated by ‘nixos-generate-config’ | |
# and may be overwritten by future invocations. Please make changes | |
# to /etc/nixos/configuration.nix instead. | |
{ config, lib, pkgs, modulesPath, ... }: | |
{ | |
imports = | |
[ (modulesPath + "/profiles/qemu-guest.nix") | |
]; | |
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ]; | |
boot.initrd.kernelModules = [ ]; | |
boot.kernelModules = [ "kvm-intel" ]; | |
boot.extraModulePackages = [ ]; | |
fileSystems."/" = | |
{ device = "/dev/disk/by-uuid/61f5e0e2-93c5-44bd-856e-bb7c76a10554"; | |
fsType = "ext3"; | |
}; | |
fileSystems."/boot" = | |
{ device = "/dev/disk/by-uuid/401A-0BD4"; | |
fsType = "vfat"; | |
options = [ "fmask=0022" "dmask=0022" ]; | |
}; | |
swapDevices = | |
[ { device = "/dev/disk/by-uuid/a38aee27-e24d-412c-aa4a-602d94b17101"; } | |
]; | |
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking | |
# (the default) this is the recommended approach. When using systemd-networkd it's | |
# still possible to use this option, but it's recommended to use it in conjunction | |
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | |
networking.useDHCP = lib.mkDefault true; | |
# networking.interfaces.eth0.useDHCP = lib.mkDefault true; | |
# networking.interfaces.eth1.useDHCP = lib.mkDefault true; | |
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#!nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/4b87f8820eba50283dbcc38442d49439a4117529.tar.gz -i bash -p nix parallel rr | |
set -e | |
SCRIPT_DIR=$(dirname -- "$0";) | |
RRDIR="$SCRIPT_DIR/rr-testing" | |
cd "$SCRIPT_DIR" | |
gorun() { | |
for (( i=0; i < 40; i = i + 1 )); do | |
_RR_TRACE_DIR=$RRDIR parallel -N0 --verbose --halt-on-error 2 --lb rr record --chaos -- nix eval --eval-store "$(pwd)/store" -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/4b87f8820eba50283dbcc38442d49439a4117529.tar.gz -I nixos-config=./configuration.nix -f '"<nixpkgs/nixos>"' config.system.build.toplevel ::: {1..10} | |
done | |
} | |
nix --version | |
while true; do | |
rm -rvf "$RRDIR" | |
gorun | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment