2024-01-22 22:50:51 +01:00
|
|
|
{
|
2024-02-08 20:53:22 +01:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
# required for home-manager modules
|
2024-03-30 21:29:53 +01:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
get-flake.url = "github:ursi/get-flake";
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
mobile-nixos.url = "github:NixOS/mobile-nixos";
|
|
|
|
mobile-nixos.flake = false;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-22 22:50:51 +01:00
|
|
|
};
|
|
|
|
|
2024-03-07 22:01:03 +01:00
|
|
|
nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?ref=main";
|
|
|
|
# nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s?ref=refs/tags/2024-02-28";
|
2024-02-08 20:59:08 +01:00
|
|
|
# nixos-x13s.url = "path:/home/steveej/src/others/nixos-x13s";
|
2024-03-01 12:03:12 +01:00
|
|
|
# nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
|
2024-04-21 21:53:35 +02:00
|
|
|
|
|
|
|
mycelium.url = "github:threefoldtech/mycelium";
|
2024-02-08 20:53:22 +01:00
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
get-flake,
|
|
|
|
nixpkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
targetPlatform = "aarch64-linux";
|
|
|
|
buildPlatform = "x86_64-linux";
|
|
|
|
repoFlake = get-flake ../../../..;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
mkNixosConfiguration = {
|
|
|
|
nodeName,
|
|
|
|
extraModules ? [],
|
|
|
|
...
|
|
|
|
} @ attrs:
|
|
|
|
nixpkgs.lib.nixosSystem (
|
|
|
|
nixpkgs.lib.attrsets.recursiveUpdate
|
|
|
|
attrs
|
|
|
|
{
|
|
|
|
specialArgs =
|
|
|
|
(import ./default.nix {
|
|
|
|
system = targetPlatform;
|
|
|
|
inherit nodeName repoFlake;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
nodeFlake = self;
|
|
|
|
})
|
|
|
|
.meta
|
|
|
|
.nodeSpecialArgs
|
|
|
|
.${nodeName};
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
modules =
|
|
|
|
[
|
|
|
|
# repoFlake.nixosModules.hardware-x13s
|
|
|
|
]
|
|
|
|
++ extraModules;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in {
|
|
|
|
lib = {
|
|
|
|
inherit mkNixosConfiguration;
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations = let
|
|
|
|
nodeName = "steveej-x13s";
|
|
|
|
in {
|
|
|
|
native = mkNixosConfiguration {
|
|
|
|
inherit nodeName;
|
|
|
|
system = targetPlatform;
|
|
|
|
extraModules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
};
|
2024-01-28 21:18:08 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
cross = mkNixosConfiguration {
|
|
|
|
inherit nodeName;
|
|
|
|
extraModules = [
|
|
|
|
./configuration.nix
|
2024-01-28 21:18:08 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
{
|
|
|
|
nixpkgs.buildPlatform.system = buildPlatform;
|
|
|
|
nixpkgs.hostPlatform.system = targetPlatform;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
};
|
2024-02-08 20:53:22 +01:00
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
}
|