WIP everything
This commit is contained in:
parent
2a23c7fdbe
commit
26f0bde4b3
29 changed files with 1630 additions and 423 deletions
80
nix/os/devices/voodoo/flake.nix
Normal file
80
nix/os/devices/voodoo/flake.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue