nix-config/hosts/riscbert/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.5 KiB
Nix
Raw Normal View History

2022-09-06 01:28:08 +02:00
{ hostRegistry, config, lib, pkgs, ... }:
2022-06-08 22:55:35 +02:00
{
2022-09-06 01:28:08 +02:00
networking.hostName = "riscbert";
2022-06-08 22:55:35 +02:00
boot = {
kernelParams = [
2022-10-28 02:53:34 +02:00
"verbose"
# "console=ttyS0,115200n8"
2022-06-08 22:55:35 +02:00
"elevator=deadline"
2022-10-28 02:53:34 +02:00
"boot.shell_on_fail"
2022-06-08 22:55:35 +02:00
];
2022-09-06 01:28:08 +02:00
initrd = {
network = {
enable = true;
flushBeforeStage2 = false;
};
supportedFilesystems = lib.mkForce [
"nfs"
];
# includeDefaultModules = false;
2022-09-06 01:28:08 +02:00
availableKernelModules = [
2022-10-28 02:53:34 +02:00
"dwmac-generic"
"nfs" "nfsv4"
2022-09-06 01:28:08 +02:00
"usbhid"
];
};
tmpOnTmpfs = true;
2022-06-08 22:55:35 +02:00
};
fileSystems."/mnt/sd" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
# install kernel+initrd onto sd card
fileSystems."/boot" = {
device = "/mnt/sd/boot";
fsType = "none";
options = [ "bind" ];
};
fileSystems."/" = {
2022-09-07 16:39:21 +02:00
device = "${hostRegistry.hosts.nfsroot.ip4}:/var/lib/nfsroot/riscbert";
fsType = "nfs";
2022-10-28 02:53:34 +02:00
options = [ "nfsvers=4" "proto=tcp" "nolock" "hard" "async" "rw" ];
2022-09-07 16:39:21 +02:00
};
2022-06-08 22:55:35 +02:00
2022-09-26 23:47:36 +02:00
system.build.bootFiles = pkgs.runCommand "boot-files" {} ''
2022-06-08 22:55:35 +02:00
mkdir -p $out/boot
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d $out/boot
'';
2022-09-06 01:28:08 +02:00
services.journald.extraConfig = ''
Storage=volatile
'';
nix = {
daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle";
2022-12-04 06:36:57 +01:00
settings = {
builders-use-substitutes = true;
cores = 2;
max-jobs = 1;
# trusted-users = [ "client" ];
};
2022-09-06 01:28:08 +02:00
};
2022-06-22 00:47:58 +02:00
system.stateVersion = "22.05";
2022-06-08 22:55:35 +02:00
}