74 lines
1.8 KiB
Nix
74 lines
1.8 KiB
Nix
|
{
|
||
|
inputs =
|
||
|
{
|
||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||
|
|
||
|
# requires for home-manager modules
|
||
|
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||
|
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||
|
|
||
|
get-flake.url = "github:ursi/get-flake";
|
||
|
|
||
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
|
||
|
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
||
|
mobile-nixos.flake = false;
|
||
|
|
||
|
home-manager = {
|
||
|
url = "github:nix-community/home-manager/release-23.11";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
outputs =
|
||
|
{ self
|
||
|
, get-flake
|
||
|
, nixpkgs
|
||
|
, ...
|
||
|
}:
|
||
|
let
|
||
|
targetPlatform = "aarch64-linux";
|
||
|
buildPlatform = "x86_64-linux";
|
||
|
nodeName = "steveej-x13s";
|
||
|
|
||
|
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 =
|
||
|
[
|
||
|
({ repoFlake, ... }: repoFlake.nixosModules.hardware-x13s)
|
||
|
|
||
|
./configuration.nix
|
||
|
]
|
||
|
++ extraModules;
|
||
|
}
|
||
|
);
|
||
|
in
|
||
|
{
|
||
|
nixosConfigurations = {
|
||
|
native = mkNixosConfiguration {
|
||
|
system = targetPlatform;
|
||
|
};
|
||
|
|
||
|
cross = mkNixosConfiguration {
|
||
|
extraModules = [
|
||
|
{
|
||
|
nixpkgs.buildPlatform.system = buildPlatform;
|
||
|
nixpkgs.hostPlatform.system = targetPlatform;
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|