working on orbi partition type.
This commit is contained in:
parent
96a7ec46f5
commit
e69c5844e0
2 changed files with 13 additions and 22 deletions
|
@ -4,7 +4,8 @@
|
||||||
# nixos-install
|
# nixos-install
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
disks = [ "sda" "sdb" ];
|
#disks = [ "sda" "sdb" ];
|
||||||
|
disks = [ "sda" ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when i nix build something.
|
# ZFS already has its own scheduler. Without this my(@Artturin) computer froze for a second when i nix build something.
|
||||||
|
@ -21,16 +22,17 @@ in
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/${disk}";
|
device = "/dev/${disk}";
|
||||||
content = {
|
content = {
|
||||||
#type = "table";
|
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
boot = {
|
boot = {
|
||||||
|
priority = 0;
|
||||||
#start = "0";
|
#start = "0";
|
||||||
#end = "1M";
|
#end = "1M";
|
||||||
size = "1M";
|
size = "1M";
|
||||||
type = "EF02"; # for grub MBR
|
type = "EF02"; # for grub MBR
|
||||||
};
|
};
|
||||||
ESP = {
|
ESP = {
|
||||||
|
priority = 1;
|
||||||
#start = "1M";
|
#start = "1M";
|
||||||
#end = "500M";
|
#end = "500M";
|
||||||
size = "500M";
|
size = "500M";
|
||||||
|
@ -39,27 +41,16 @@ in
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
# mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
mountpoint = "/boot_${disk}";
|
#mountpoint = "/boot_${disk}";
|
||||||
mountOptions = [ "defaults" ];
|
mountOptions = [ "defaults" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#{
|
|
||||||
# name = "ESP";
|
|
||||||
# start = "1M";
|
|
||||||
# end = "500MiB";
|
|
||||||
# bootable = true;
|
|
||||||
# content = {
|
|
||||||
# type = "filesystem";
|
|
||||||
# format = "vfat";
|
|
||||||
# mountpoint = "/boot_${disk}";
|
|
||||||
# mountOptions = [ "defaults" ];
|
|
||||||
# };
|
|
||||||
#}
|
|
||||||
root = {
|
root = {
|
||||||
#name = "zfs";
|
#name = "zfs";
|
||||||
#start = "500M";
|
#start = "500M";
|
||||||
#end = "500G";
|
#end = "500G";
|
||||||
|
priority = 10;
|
||||||
size = "500G";
|
size = "500G";
|
||||||
# content = {
|
# content = {
|
||||||
# type = "luks";
|
# type = "luks";
|
||||||
|
@ -106,7 +97,7 @@ in
|
||||||
|
|
||||||
zroot = {
|
zroot = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
mode = "mirror";
|
#mode = "mirror";
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
mountpoint = "none";
|
mountpoint = "none";
|
||||||
canmount = "off";
|
canmount = "off";
|
||||||
|
|
|
@ -29,14 +29,14 @@ in
|
||||||
{
|
{
|
||||||
# needed lvm for raid
|
# needed lvm for raid
|
||||||
#boot.initrd.kernelModules = [ ];
|
#boot.initrd.kernelModules = [ ];
|
||||||
boot.initrd.systemd.users.root.shell = "/bin/cryptsetup-askpass";
|
#boot.initrd.systemd.users.root.shell = "/bin/cryptsetup-askpass";
|
||||||
boot.initrd.systemd.services.openssh = {
|
#boot.initrd.systemd.services.openssh = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
};
|
#};
|
||||||
|
|
||||||
# Use GRUB2 as the boot loader.
|
# Use GRUB2 as the boot loader.
|
||||||
# We don't use systemd-boot because Hetzner uses BIOS legacy boot.
|
# We don't use systemd-boot because Hetzner uses BIOS legacy boot.
|
||||||
boot.loader.systemd-boot.enable = false;
|
#boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
efiSupport = false; # we created a ef02 partition because uefi is not supported on hetzner online machines.
|
efiSupport = false; # we created a ef02 partition because uefi is not supported on hetzner online machines.
|
||||||
|
|
Loading…
Reference in a new issue