Implement raspberry pi check using nixos-facter

This commit is contained in:
Pim Kunis 2024-11-04 22:27:24 +01:00
parent 4d7e81fd63
commit 2a63bee83b
5 changed files with 46 additions and 32 deletions

View file

@ -1,5 +1,6 @@
{
lib,
config,
machine,
...
}: {
@ -16,7 +17,7 @@
enable = true;
networks = lib.attrsets.mergeAttrsList [
(lib.optionalAttrs (! machine.isRaspberryPi) {
(lib.optionalAttrs (! config.facter.lab.isRaspberryPi) {
"30-main-nic" = {
matchConfig.Name = "en*";
@ -25,7 +26,7 @@
};
};
})
(lib.optionalAttrs machine.isRaspberryPi {
(lib.optionalAttrs config.facter.lab.isRaspberryPi {
"30-main-nic" = {
matchConfig.Name = "end*";
networkConfig = {