2024-01-22 22:50:51 +01:00
|
|
|
{
|
|
|
|
inputs =
|
|
|
|
{
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
|
|
|
2024-01-28 21:18:08 +01:00
|
|
|
# required for home-manager modules
|
2024-01-22 22:50:51 +01:00
|
|
|
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";
|
|
|
|
};
|
2024-01-24 00:24:04 +00:00
|
|
|
|
2024-01-30 10:11:09 +01:00
|
|
|
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
|
2024-01-24 00:24:04 +00:00
|
|
|
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-22 22:50:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, get-flake
|
|
|
|
, nixpkgs
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
targetPlatform = "aarch64-linux";
|
|
|
|
buildPlatform = "x86_64-linux";
|
2024-01-22 23:47:48 +00:00
|
|
|
repoFlake = get-flake ../../../..;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-01-28 21:18:08 +01:00
|
|
|
mkNixosConfiguration = { nodeName, extraModules ? [ ], ... } @ attrs:
|
2024-01-22 22:50:51 +01:00
|
|
|
nixpkgs.lib.nixosSystem (
|
|
|
|
nixpkgs.lib.attrsets.recursiveUpdate
|
|
|
|
attrs
|
|
|
|
{
|
|
|
|
specialArgs = (import ./default.nix {
|
|
|
|
system = targetPlatform;
|
2024-01-22 23:47:48 +00:00
|
|
|
inherit nodeName repoFlake;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
|
|
|
nodeFlake = self;
|
|
|
|
}).meta.nodeSpecialArgs.${nodeName};
|
|
|
|
|
|
|
|
modules =
|
|
|
|
[
|
2024-01-24 00:24:04 +00:00
|
|
|
# repoFlake.nixosModules.hardware-x13s
|
2024-01-22 22:50:51 +01:00
|
|
|
]
|
|
|
|
++ extraModules;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in
|
|
|
|
{
|
2024-01-28 21:18:08 +01:00
|
|
|
lib = {
|
|
|
|
inherit mkNixosConfiguration;
|
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-01-28 21:18:08 +01:00
|
|
|
nixosConfigurations =
|
|
|
|
let
|
|
|
|
nodeName = "steveej-x13s";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
native = mkNixosConfiguration {
|
|
|
|
inherit nodeName;
|
|
|
|
system = targetPlatform;
|
|
|
|
extraModules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
cross = mkNixosConfiguration {
|
|
|
|
inherit nodeName;
|
|
|
|
extraModules = [
|
|
|
|
./configuration.nix
|
|
|
|
|
|
|
|
{
|
|
|
|
nixpkgs.buildPlatform.system = buildPlatform;
|
|
|
|
nixpkgs.hostPlatform.system = targetPlatform;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|