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

88 lines
2.1 KiB
Nix
Raw Permalink Normal View History

2024-01-18 14:59:17 +00:00
{
2024-02-08 20:53:22 +01:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
2024-01-18 14:59:17 +00:00
2024-02-08 20:53:22 +01:00
# required for home-manager modules
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixpkgs-2211.url = "github:nixos/nixpkgs/nixos-22.11";
2024-02-08 20:53:22 +01:00
get-flake.url = "github:ursi/get-flake";
2024-01-18 14:59:17 +00:00
2024-02-08 20:53:22 +01:00
disko.inputs.nixpkgs.follows = "nixpkgs";
2024-01-18 14:59:17 +00:00
2024-02-08 20:53:22 +01:00
mobile-nixos.url = "github:NixOS/mobile-nixos";
mobile-nixos.flake = false;
2024-01-18 14:59:17 +00: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-18 14:59:17 +00:00
};
2024-02-08 20:53:22 +01:00
nixos-x13s.url = "git+https://codeberg.org/steveej/nixos-x13s";
nixos-x13s.inputs.nixpkgs.follows = "nixpkgs";
};
2024-01-18 14:59:17 +00:00
2024-11-15 10:17:56 +01:00
outputs =
{
self,
get-flake,
nixpkgs,
...
}:
let
system = "aarch64-linux";
buildPlatform = "x86_64-linux";
repoFlake = get-flake ../../../..;
in
{
lib = {
mkNixosConfiguration =
2024-02-08 20:53:22 +01:00
{
2024-11-15 10:17:56 +01:00
nodeName,
extraModules ? [ ],
...
}@attrs:
nixpkgs.lib.nixosSystem (
nixpkgs.lib.attrsets.recursiveUpdate attrs {
specialArgs =
(import ./default.nix {
inherit system;
inherit nodeName repoFlake;
2024-11-15 10:17:56 +01:00
nodeFlake = self;
}).meta.nodeSpecialArgs.${nodeName};
2024-01-18 14:59:17 +00:00
2024-11-15 10:17:56 +01:00
modules = extraModules;
}
);
};
2024-11-15 10:17:56 +01:00
nixosConfigurations =
let
nodeName = "steveej-x13s-rmvbl";
in
{
native = self.lib.mkNixosConfiguration {
inherit system nodeName;
extraModules = [
./configuration.nix
2024-01-18 14:59:17 +00:00
2024-11-15 10:17:56 +01:00
{ users.commonUsers.installPassword = "install"; }
];
};
2024-02-08 20:53:22 +01:00
2024-11-15 10:17:56 +01:00
cross = self.lib.mkNixosConfiguration {
inherit nodeName;
extraModules = [
./configuration.nix
2024-01-18 14:59:17 +00:00
2024-11-15 10:17:56 +01:00
{
nixpkgs.buildPlatform.system = buildPlatform;
nixpkgs.hostPlatform.system = system;
}
];
};
};
2024-01-18 14:59:17 +00:00
};
}