Implement raspberry pi check using nixos-facter
This commit is contained in:
parent
4d7e81fd63
commit
2a63bee83b
5 changed files with 46 additions and 32 deletions
|
@ -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 = {
|
||||
|
|
Reference in a new issue