mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 16:10:14 +00:00
try using disko to format for nixos-anywhere
This commit is contained in:
@ -61,16 +61,16 @@ rec {
|
|||||||
|
|
||||||
# Taken from https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/oci-common.nix
|
# Taken from https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/oci-common.nix
|
||||||
|
|
||||||
fileSystems."/" = {
|
# fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/nixos";
|
# device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
# fsType = "ext4";
|
||||||
autoResize = true;
|
# autoResize = true;
|
||||||
};
|
# };
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
# fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-label/ESP";
|
# device = "/dev/disk/by-label/ESP";
|
||||||
fsType = "vfat";
|
# fsType = "vfat";
|
||||||
};
|
# };
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
@ -90,6 +90,60 @@ rec {
|
|||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Example to create a bios compatible gpt partition
|
||||||
|
disko.devices = {
|
||||||
|
disk.disk1 = {
|
||||||
|
device = "/dev/sda";
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
name = "boot";
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02";
|
||||||
|
};
|
||||||
|
esp = {
|
||||||
|
name = "ESP";
|
||||||
|
size = "500M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
name = "root";
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg = {
|
||||||
|
pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
root = {
|
||||||
|
size = "100%FREE";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"defaults"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# # Otherwise the instance may not have a working network-online.target,
|
# # Otherwise the instance may not have a working network-online.target,
|
||||||
# # making the fetch-ssh-keys.service fail
|
# # making the fetch-ssh-keys.service fail
|
||||||
# networking.useNetworkd = true;
|
# networking.useNetworkd = true;
|
||||||
|
Reference in New Issue
Block a user