1
0
Fork 0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-11-30 06:49:43 +01:00

hastily move configs around

This commit is contained in:
Samuel Dionne-Riel 2020-07-28 18:25:05 -04:00
parent d72645f6d5
commit 39788d0c83
4 changed files with 37 additions and 26 deletions

View file

@ -1,24 +1,5 @@
{ config, pkgs, lib, ... }:
let
uboot = pkgs.uBootPinebookPro;
in
{ {
imports = [ imports = [
<nixpkgs/nixos/modules/profiles/base.nix>
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/installation-device.nix>
./nixos/sd-image-aarch64.nix
./pinebook_pro.nix ./pinebook_pro.nix
]; ];
sdImage = {
manipulateImageCommands = ''
(PS4=" $ "; set -x
dd if=${uboot}/idbloader.img of=$img bs=512 seek=64 conv=notrunc
dd if=${uboot}/u-boot.itb of=$img bs=512 seek=16384 conv=notrunc
)
'';
compressImage = lib.mkForce false;
};
} }

View file

@ -7,7 +7,7 @@ let
inherit (config.sdImage) storePaths; inherit (config.sdImage) storePaths;
#compressImage = false; #compressImage = false;
populateImageCommands = config.sdImage.populateRootCommands; populateImageCommands = config.sdImage.populateRootCommands;
volumeLabel = "NIXOS_SD"; volumeLabel = "NIXOS_RECOVERY";
} // optionalAttrs (config.sdImage.rootPartitionUUID != null) { } // optionalAttrs (config.sdImage.rootPartitionUUID != null) {
uuid = config.sdImage.rootPartitionUUID; uuid = config.sdImage.rootPartitionUUID;
}); });
@ -87,7 +87,7 @@ in
config = { config = {
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/NIXOS_SD"; device = "/dev/disk/by-label/NIXOS_RECOVERY";
fsType = "ext4"; fsType = "ext4";
}; };
}; };

25
sd-image.nix Normal file
View file

@ -0,0 +1,25 @@
{ config, pkgs, lib, ... }:
let
uboot = pkgs.uBootPinebookProExternalFirst;
in
{
imports = [
<nixpkgs/nixos/modules/profiles/base.nix>
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/installation-device.nix>
./nixos/sd-image-aarch64.nix
./pinebook_pro.nix
];
sdImage = {
manipulateImageCommands = ''
(PS4=" $ "; set -x
dd if=${uboot}/idbloader.img of=$img bs=512 seek=64 conv=notrunc
dd if=${uboot}/u-boot.itb of=$img bs=512 seek=16384 conv=notrunc
)
'';
compressImage = lib.mkForce false;
};
}

View file

@ -1,7 +1,12 @@
import <nixpkgs/nixos> { import <nixpkgs/nixos> {
configuration = configuration = {
imports = [
(
if builtins.currentSystem == "aarch64-linux" if builtins.currentSystem == "aarch64-linux"
then builtins.toPath (./. + "/configuration.nix") then builtins.toPath (./. + "/configuration.nix")
else builtins.toPath (./. + "/with-cross.nix") else builtins.toPath (./. + "/with-cross.nix")
; )
./sd-image.nix
];
};
} }