feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
File diff suppressed because it is too large
Load diff
|
@ -5,25 +5,24 @@
|
|||
nodeFlake,
|
||||
localDomainName ? "internal",
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
meta.nodeSpecialArgs.${nodeName} = {
|
||||
inherit repoFlake nodeName nodeFlake system;
|
||||
inherit
|
||||
repoFlake
|
||||
nodeName
|
||||
nodeFlake
|
||||
system
|
||||
;
|
||||
packages' = repoFlake.packages.${system};
|
||||
nodePackages' = nodeFlake.packages.${system};
|
||||
|
||||
inherit
|
||||
(nodeFlake.inputs.bpir3.packages.${system})
|
||||
armTrustedFirmwareMT7986
|
||||
;
|
||||
inherit (nodeFlake.inputs.bpir3.packages.${system}) armTrustedFirmwareMT7986;
|
||||
|
||||
inherit localDomainName;
|
||||
};
|
||||
|
||||
meta.nodeNixpkgs.${nodeName} =
|
||||
import nodeFlake.inputs.nixpkgs.outPath
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
meta.nodeNixpkgs.${nodeName} = import nodeFlake.inputs.nixpkgs.outPath { inherit system; };
|
||||
|
||||
${nodeName} = {
|
||||
deployment.targetHost = "${nodeName}.${localDomainName}";
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
# "github:steveej-forks/nakato_nixos-sbc/kernel-6.9_and_cross-compile"
|
||||
# "github:steveej-forks/nakato_nixos-sbc/kernel-6.10_and_cross-compile"
|
||||
"github:steveej-forks/nakato_nixos-sbc/kernel-6.10_and_cross-compile_mtkbump"
|
||||
# "git+file:///home/steveej/src/others/nakato_nixos-sbc/"
|
||||
;
|
||||
# "git+file:///home/steveej/src/others/nakato_nixos-sbc/"
|
||||
;
|
||||
nixos-sbc.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nixos-nftables-firewall.url = "github:thelegy/nixos-nftables-firewall";
|
||||
|
@ -39,43 +39,34 @@
|
|||
# };
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
nixos-sbc,
|
||||
...
|
||||
}: let
|
||||
nativeSystem = "aarch64-linux";
|
||||
nodeName = "router0-dmz0";
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
get-flake,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nativeSystem = "aarch64-linux";
|
||||
nodeName = "router0-dmz0";
|
||||
|
||||
pkgs = nixpkgs.legacyPackages.${nativeSystem};
|
||||
pkgsCross = import self.inputs.nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
crossSystem = {
|
||||
config = "aarch64-unknown-linux-gnu";
|
||||
};
|
||||
};
|
||||
|
||||
mkNixosConfiguration = {extraModules ? [], ...} @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
mkNixosConfiguration =
|
||||
{
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = nativeSystem;
|
||||
inherit nodeName;
|
||||
extraModules ? [ ],
|
||||
...
|
||||
}@attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate attrs {
|
||||
specialArgs =
|
||||
(import ./default.nix {
|
||||
system = nativeSystem;
|
||||
inherit nodeName;
|
||||
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
})
|
||||
.meta
|
||||
.nodeSpecialArgs
|
||||
.${nodeName};
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
modules = [
|
||||
./configuration.nix
|
||||
|
||||
# flake registry
|
||||
|
@ -83,34 +74,30 @@
|
|||
nixpkgs.overlays = builtins.attrValues self.overlays;
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
}
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
native = mkNixosConfiguration {
|
||||
system = nativeSystem;
|
||||
};
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
extraModules = [
|
||||
{
|
||||
nixpkgs.buildPlatform.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform.system = nativeSystem;
|
||||
] ++ extraModules;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
);
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
native = mkNixosConfiguration { system = nativeSystem; };
|
||||
|
||||
overlays.default = final: previous: {
|
||||
hostapd = previous.hostapd.overrideDerivation (attrs: {
|
||||
patches =
|
||||
attrs.patches
|
||||
++ [
|
||||
cross = mkNixosConfiguration {
|
||||
extraModules = [
|
||||
{
|
||||
nixpkgs.buildPlatform.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform.system = nativeSystem;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
overlays.default = _final: previous: {
|
||||
hostapd = previous.hostapd.overrideDerivation (attrs: {
|
||||
patches = attrs.patches ++ [
|
||||
"${self.inputs.openwrt}/package/network/services/hostapd/patches/710-vlan_no_bridge.patch"
|
||||
];
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue