infra/nix/os/devices/steveej-x13s/flake.nix

122 lines
3.5 KiB
Nix
Raw Permalink Normal View History

{
2024-02-08 20:53:22 +01:00
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
2024-11-24 16:09:58 +01:00
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs-unstable.url = "github:steveej-forks/nixpkgs/nixos-unstable";
2024-02-08 20:53:22 +01:00
get-flake.url = "github:ursi/get-flake";
2024-02-08 20:53:22 +01:00
disko.inputs.nixpkgs.follows = "nixpkgs";
2024-02-08 20:53:22 +01:00
home-manager = {
url = "github:steveej-forks/home-manager/master";
# url = "github:nix-community/home-manager/master";
# url = "github:nix-community/home-manager/release-24.11";
2024-02-08 20:53:22 +01:00
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-x13s.url = "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?ref=bump"
# 6.13-rc2
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?ref=bump&rev=c95058f8aa1b361df3874429c5dc0f694f9cba78"
2024-11-15 10:17:56 +01:00
# 6.11.0
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=6b9efe77ca80653354981c720af3c4241ac71490"
# 6.12.0-rc6
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=bd580ee9c35fcb8a720122d5bb2f903f1b7395ee"
# "git+https://forgejo.www.stefanjunker.de/steveej/nixos-x13s.git?branch=remaintain&rev=1286d20be2321a1a2d27f5d09257ebaf54ce0630"
#"/home/steveej/src/others/nixos-x13s"
#
;
2024-02-08 20:59:08 +01:00
# nixos-x13s.url = "path:/home/steveej/src/others/nixos-x13s";
# nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
ath11k-firmware = {
url = "git+https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git";
flake = false;
};
mycelium.url = "github:threefoldtech/mycelium";
mycelium.inputs.nixpkgs.follows = "nixpkgs";
nix-snapshotter = {
url = "github:yu-re-ka/nix-snapshotter";
# url = "github:pdtpartners/nix-snapshotter";
inputs.nixpkgs.follows = "nixpkgs";
};
extra-container = {
url = "github:erikarvstedt/extra-container";
inputs.nixpkgs.follows = "nixpkgs";
};
signal-desktop = {
url = "github:youwen5/signal-desktop-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-02-08 20:53:22 +01:00
};
2024-11-15 10:17:56 +01:00
outputs =
{
self,
get-flake,
nixpkgs,
...
}:
let
nativeSystem = "aarch64-linux";
nodeName = "steveej-x13s";
repoFlake = get-flake ../../../..;
mkNixosConfiguration =
2024-02-08 20:53:22 +01:00
{
2024-11-15 10:17:56 +01:00
extraModules ? [ ],
...
}@attrs:
nixpkgs.lib.nixosSystem (
nixpkgs.lib.attrsets.recursiveUpdate attrs {
specialArgs =
(import ./default.nix {
system = nativeSystem;
inherit nodeName;
inherit repoFlake;
repoFlakeWithSystem = repoFlake.lib.withSystem;
nodeFlake = self;
}).meta.nodeSpecialArgs.${nodeName};
modules = [
2024-08-22 14:33:00 +02:00
./configuration.nix
# flake registry
2024-11-15 10:17:56 +01:00
{ nix.registry.nixpkgs.flake = nixpkgs; }
] ++ extraModules;
}
);
in
{
lib = {
inherit mkNixosConfiguration;
};
2024-02-08 20:53:22 +01:00
overlays.default =
_final: _previous:
{
};
2024-08-22 14:33:00 +02:00
2024-11-15 10:17:56 +01:00
nixosConfigurations = {
native = mkNixosConfiguration { system = nativeSystem; };
2024-11-15 10:17:56 +01:00
cross = mkNixosConfiguration {
extraModules = [
{
nixpkgs.buildPlatform.system = "x86_64-linux";
nixpkgs.hostPlatform.system = nativeSystem;
}
];
};
2024-02-08 20:53:22 +01:00
};
};
}