Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
conflict
  • Loading branch information
mlyxshi committed Dec 23, 2024
2 parents f8106ae + 6267a85 commit 8629bb0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,7 @@ jobs:
- run: $SSH $HOST NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root /mnt -- /run/current-system/bin/switch-to-configuration boot
- run: $SSH $HOST reboot

- run: curl https://api.day.app/${{ secrets.BARK_KEY }}/${{ inputs.flakeAttr }}?group=NixOS&icon=https://hydra.nixos.org/logo
- run: curl "https://api.day.app/${{ secrets.BARK_KEY }}/NixOS%20Install%20Done/${{ inputs.flakeAttr }}?group=NixOS&icon=https://hydra.nixos.org/logo"



2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
-bios $(ls /opt/homebrew/Cellar/qemu/*/share/qemu/edk2-aarch64-code.fd)
'';
};
aarch64-linux = lib.genAttrs (getArchPkgs "aarch64-linux") (name: nixpkgs.legacyPackages.aarch64-linux.callPackage ./pkgs/${name} { });
aarch64-linux = lib.genAttrs (getArchPkgs "aarch64-linux") (name: nixpkgs.legacyPackages.aarch64-linux.callPackage ./pkgs/${name} { });
x86_64-linux = lib.genAttrs (getArchPkgs "x86_64-linux") (name: nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/${name} { });
};

Expand Down
37 changes: 18 additions & 19 deletions kexec/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{ config, pkgs, lib, ... }:
let
rootPartType = {
x64 = "4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709";
aa64 = "B921B045-1DF0-41C3-AF44-4C6F280D3FAE";
}.${pkgs.stdenv.hostPlatform.efiArch};
in
{

{ config, pkgs, lib, ... }: {
system.stateVersion = lib.trivial.release;

system.build.kexec = pkgs.runCommand "" { } ''
Expand Down Expand Up @@ -36,8 +28,8 @@ in
# vfat native language support
"nls_cp437"
"nls_iso8859-1"
# scsi
"virtio_scsi"
# Oracle cloud
"virtio_scsi" # https://www.qemu.org/2021/01/19/virtio-blk-scsi-configuration/
];

boot.initrd.systemd.contents = {
Expand Down Expand Up @@ -118,12 +110,19 @@ in
hx = "${pkgs.helix}/bin/hx";

# https://superuser.com/questions/1572410/what-is-the-purpose-of-the-linux-home-partition-code-8302
make-partitions = pkgs.writeScript "make-partitions" ''
DEVICE=$1
sgdisk --zap-all $DEVICE
sgdisk --new=0:0:+512M --typecode=0:ef00 $DEVICE
sgdisk --new=0:0:0 --typecode=0:${rootPartType} $DEVICE
'';
make-partitions =
let
rootPartType = {
x64 = "4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709";
aa64 = "B921B045-1DF0-41C3-AF44-4C6F280D3FAE";
}.${pkgs.stdenv.hostPlatform.efiArch};
in
pkgs.writeScript "make-partitions" ''
DEVICE=$1
sgdisk --zap-all $DEVICE
sgdisk --new=0:0:+512M --typecode=0:ef00 $DEVICE
sgdisk --new=0:0:0 --typecode=0:${rootPartType} $DEVICE
'';

mount-partitions = pkgs.writeScript "mount-partitions" ''
DEVICE=$1
Expand All @@ -143,8 +142,8 @@ in
after = [ "sysroot-run.mount" ]; # bind /run to /sysroot/run
serviceConfig.Type = "oneshot";
script = ''
root_fs_type="$(cat /proc/mounts | head -n 1 | cut -d ' ' -f 1)"
if [ "$root_fs_type" != "tmpfs" ]; then
root_device_type="$(cat /proc/mounts | head -n 1 | cut -d ' ' -f 1)"
if [ "$root_device_type" != "tmpfs" ]; then
cp -R /init /bin /etc /lib /nix /root /sbin /var /sysroot
cp /run/credentials/@system/github-private-key /sysroot/run/credentials/
mkdir -p /sysroot/tmp
Expand Down
2 changes: 1 addition & 1 deletion modules/os/darwin/brew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# "suspicious-package"

# "snipaste"


##############################################
# "karabiner-elements"
Expand Down

0 comments on commit 8629bb0

Please sign in to comment.