WIP: x13s: install to nvme, refactor into module
This commit is contained in:
parent
40416bd4de
commit
a083c05b27
28 changed files with 1361 additions and 737 deletions
73
nix/os/devices/steveej-x13s/flake.nix
Normal file
73
nix/os/devices/steveej-x13s/flake.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
inputs =
|
||||
{
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# requires for home-manager modules
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, get-flake
|
||||
, nixpkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
targetPlatform = "aarch64-linux";
|
||||
buildPlatform = "x86_64-linux";
|
||||
nodeName = "steveej-x13s";
|
||||
|
||||
mkNixosConfiguration = { extraModules ? [ ], ... } @ attrs:
|
||||
nixpkgs.lib.nixosSystem (
|
||||
nixpkgs.lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
{
|
||||
specialArgs = (import ./default.nix {
|
||||
system = targetPlatform;
|
||||
inherit nodeName;
|
||||
|
||||
repoFlake = get-flake ../../../..;
|
||||
nodeFlake = self;
|
||||
}).meta.nodeSpecialArgs.${nodeName};
|
||||
|
||||
modules =
|
||||
[
|
||||
({ repoFlake, ... }: repoFlake.nixosModules.hardware-x13s)
|
||||
|
||||
./configuration.nix
|
||||
]
|
||||
++ extraModules;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
native = mkNixosConfiguration {
|
||||
system = targetPlatform;
|
||||
};
|
||||
|
||||
cross = mkNixosConfiguration {
|
||||
extraModules = [
|
||||
{
|
||||
nixpkgs.buildPlatform.system = buildPlatform;
|
||||
nixpkgs.hostPlatform.system = targetPlatform;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue