81 lines
1.8 KiB
Nix
81 lines
1.8 KiB
Nix
|
{
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||
|
|
||
|
get-flake.url = "github:ursi/get-flake";
|
||
|
|
||
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
srvos.url = "github:numtide/srvos";
|
||
|
srvos.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
|
||
|
outputs = {
|
||
|
self,
|
||
|
get-flake,
|
||
|
nixpkgs,
|
||
|
...
|
||
|
}: let
|
||
|
targetPlatform = "i686-linux";
|
||
|
buildPlatform = "x86_64-linux";
|
||
|
nodeName = "voodoo";
|
||
|
|
||
|
pkgs = nixpkgs.legacyPackages.${targetPlatform};
|
||
|
pkgsCross = import self.inputs.nixpkgs {
|
||
|
system = buildPlatform;
|
||
|
crossSystem = {
|
||
|
config = "pentium2-unknown-linux-gnu";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
mkNixosConfiguration = {extraModules ? [], ...} @ attrs:
|
||
|
nixpkgs.lib.nixosSystem (
|
||
|
nixpkgs.lib.attrsets.recursiveUpdate
|
||
|
attrs
|
||
|
{
|
||
|
specialArgs = (import ./default.nix {
|
||
|
system = targetPlatform;
|
||
|
inherit nodeName;
|
||
|
|
||
|
repoFlake = get-flake ../../../..;
|
||
|
nodeFlake = self;
|
||
|
}).meta.nodeSpecialArgs.${nodeName};
|
||
|
|
||
|
modules =
|
||
|
[
|
||
|
./configuration.nix
|
||
|
|
||
|
# flake registry
|
||
|
{
|
||
|
nix.registry.nixpkgs.flake = nixpkgs;
|
||
|
}
|
||
|
|
||
|
{
|
||
|
nixpkgs.overlays = [
|
||
|
(final: previous:
|
||
|
{
|
||
|
})
|
||
|
|
||
|
];
|
||
|
}
|
||
|
]
|
||
|
++ extraModules;
|
||
|
}
|
||
|
);
|
||
|
in {
|
||
|
nixosConfigurations = {
|
||
|
native = mkNixosConfiguration {
|
||
|
system = targetPlatform;
|
||
|
};
|
||
|
|
||
|
cross = mkNixosConfiguration {
|
||
|
extraModules = [
|
||
|
{
|
||
|
nixpkgs.buildPlatform.system = buildPlatform;
|
||
|
nixpkgs.hostPlatform.system = targetPlatform;
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|