Added vps config, rearranged current one

This commit is contained in:
Lgmrszd 2024-01-12 23:09:13 +03:00
parent 8da5147ff4
commit 8b5554e732
No known key found for this signature in database
GPG key ID: 9396B8BA6FBB14DE
8 changed files with 133 additions and 26 deletions

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, pkgs-stable, secrets, ... }:
{ config, pkgs, pkgs-stable, ... }:
{
# boot.kernelPackages = pkgs.linuxPackages_zen;
@ -32,9 +32,9 @@
insmod fat
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 ${secrets.drive-ids.volumes.windows_efi_uuid}
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 8D94-2A4E
else
search --no-floppy --fs-uuid --set=root ${secrets.drive-ids.volumes.windows_efi_uuid}
search --no-floppy --fs-uuid --set=root 8D94-2A4E
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
@ -43,11 +43,11 @@
insmod fat
# set root='hd0,gpt4'
# if [ x$feature_platform_search_hint = xy ]; then
# search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 ${secrets.drive-ids.volumes.ventoy_efi_uuid}
# search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 BDAD-470D
# else
# search --no-floppy --fs-uuid --set=root ${secrets.drive-ids.volumes.ventoy_efi_uuid}
# search --no-floppy --fs-uuid --set=root BDAD-470D
# fi
search --no-floppy --fs-uuid --set=root ${secrets.drive-ids.volumes.ventoy_efi_uuid}
search --no-floppy --fs-uuid --set=root BDAD-470D
chainloader /EFI/BOOT/BOOTX64.EFI
}
'';
@ -80,10 +80,10 @@
# ==[SECURITY]==
# LUKS options
# boot.initrd.luks.fido2Support = true;
boot.initrd.luks.devices = with secrets.drive-ids.luks; {
boot.initrd.luks.devices = {
crypted = {
inherit device;
inherit header;
device = "/dev/disk/by-path/pci-0000:02:00.0-nvme-1";
header = "/dev/disk/by-partuuid/3c43dda3-6a23-7148-add5-84354a28a59e";
preLVM = true;
crypttabExtraOpts = [ "fido2-device=auto" "token-timeout=10s" ];
# fido2.credential = "";
@ -335,7 +335,6 @@
zramSwap = {
enable = true;
# swapDevices = 2;
# writebackDevice = secrets.drive-ids.volumes.swap;
};
# List services that you want to enable: