WIP raspberry pi support

This commit is contained in:
Pim Kunis 2024-02-26 23:08:12 +01:00
parent 510dd8cf8a
commit c2e2ed5ea8
5 changed files with 63 additions and 34 deletions
nixos/modules

View file

@ -35,7 +35,7 @@ in {
networking = {
domain = if machine.type == "physical" then "hyp" else "dmz";
nftables.enable = true;
useDHCP = false;
useDHCP = true;
firewall = {
enable = true;
@ -43,7 +43,7 @@ in {
};
};
systemd.network = lib.mkIf (machine.type == "physical") {
systemd.network = lib.mkIf (false && machine.type == "physical") {
enable = true;
netdevs = {

View file

@ -10,7 +10,8 @@ in {
};
dataPartition = lib.mkOption {
type = lib.types.str;
default = null;
type = lib.types.nullOr lib.types.str;
description = ''
Partition to be used for data storage on this machine.
'';
@ -25,8 +26,10 @@ in {
};
};
config = lib.mkIf (machine.type == "physical") {
fileSystems.${cfg.dataMountPoint}.device = cfg.dataPartition;
config = lib.mkIf (false && machine.type == "physical") {
fileSystems.${cfg.dataMountPoint} = lib.mkIf (! isNull cfg.dataPartition) {
device = cfg.dataPartition;
};
# TODO: Rename this to 'osDisk'. Unfortunately, we would need to run nixos-anywhere again then.
disko.devices.disk.vdb = {