2024-01-22 22:50:51 +01:00
|
|
|
{
|
2024-02-08 20:53:22 +01:00
|
|
|
inputs = {
|
2024-06-01 15:06:06 +02:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
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
|
|
|
home-manager = {
|
2024-06-01 15:06:06 +02:00
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
2024-02-08 20:53:22 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-22 22:50:51 +01:00
|
|
|
};
|
|
|
|
|
2024-09-06 10:38:27 +02:00
|
|
|
nixos-x13s.url =
|
|
|
|
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain"
|
|
|
|
"/home/steveej/src/others/nixos-x13s"
|
|
|
|
#
|
|
|
|
;
|
|
|
|
|
2024-03-07 22:01:03 +01:00
|
|
|
# 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-06-13 16:42:55 +02:00
|
|
|
|
|
|
|
nix-snapshotter = {
|
|
|
|
url = "github:yu-re-ka/nix-snapshotter";
|
|
|
|
# url = "github:pdtpartners/nix-snapshotter";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
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
|
2024-08-22 14:33:00 +02:00
|
|
|
nativeSystem = "aarch64-linux";
|
|
|
|
nodeName = "steveej-x13s";
|
|
|
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${nativeSystem};
|
|
|
|
pkgsCross = import self.inputs.nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
crossSystem = {
|
|
|
|
config = "aarch64-unknown-linux-gnu";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
repoFlake = get-flake ../../../..;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-08-22 14:33:00 +02:00
|
|
|
mkNixosConfiguration = {extraModules ? [], ...} @ attrs:
|
2024-02-08 20:53:22 +01:00
|
|
|
nixpkgs.lib.nixosSystem (
|
|
|
|
nixpkgs.lib.attrsets.recursiveUpdate
|
|
|
|
attrs
|
|
|
|
{
|
|
|
|
specialArgs =
|
|
|
|
(import ./default.nix {
|
2024-08-22 14:33:00 +02:00
|
|
|
system = nativeSystem;
|
|
|
|
inherit nodeName;
|
2024-01-22 22:50:51 +01:00
|
|
|
|
2024-08-22 14:33:00 +02:00
|
|
|
inherit repoFlake;
|
|
|
|
repoFlakeWithSystem = repoFlake.lib.withSystem;
|
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 =
|
|
|
|
[
|
2024-08-22 14:33:00 +02:00
|
|
|
./configuration.nix
|
|
|
|
|
|
|
|
# flake registry
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = builtins.attrValues self.overlays;
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
}
|
2024-02-08 20:53:22 +01:00
|
|
|
]
|
|
|
|
++ extraModules;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
in {
|
|
|
|
lib = {
|
|
|
|
inherit mkNixosConfiguration;
|
|
|
|
};
|
|
|
|
|
2024-08-22 14:33:00 +02:00
|
|
|
overlays = {};
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
2024-02-08 20:53:22 +01:00
|
|
|
native = mkNixosConfiguration {
|
2024-08-22 14:33:00 +02:00
|
|
|
system = nativeSystem;
|
2024-02-08 20:53:22 +01:00
|
|
|
};
|
2024-01-28 21:18:08 +01:00
|
|
|
|
2024-02-08 20:53:22 +01:00
|
|
|
cross = mkNixosConfiguration {
|
|
|
|
extraModules = [
|
|
|
|
{
|
2024-08-22 14:33:00 +02:00
|
|
|
nixpkgs.buildPlatform.system = "x86_64-linux";
|
|
|
|
nixpkgs.hostPlatform.system = nativeSystem;
|
2024-02-08 20:53:22 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
};
|
2024-02-08 20:53:22 +01:00
|
|
|
};
|
2024-01-22 22:50:51 +01:00
|
|
|
}
|