Put boot partition on RAID1 device

Create users with empty password on gamepc
This commit is contained in:
Pim Kunis 2024-11-09 12:25:07 +01:00
parent 3e3f589e4f
commit 87153f15be
2 changed files with 22 additions and 38 deletions

View file

@ -5,30 +5,14 @@
};
facter.reportPath = ./facter.json;
networking.hostName = "gamepc";
# boot = {
# loader = {
# systemd-boot.enable = true;
# efi.canTouchEfiVariables = true;
# };
# };
users.users.pim.password = "";
users.users.root.password = "";
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
mirroredBoots = [
{
path = "/boot0";
devices = ["nodev"];
}
{
path = "/boot1";
devices = ["nodev"];
}
];
};
disko.devices.disk = lib.genAttrs ["0" "1"] (name: {
@ -37,14 +21,16 @@
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
type = "EF00";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot${name}";
mountOptions = ["umask=0077"];
type = "mdraid";
name = "boot";
};
};
mdadm = {
@ -59,16 +45,16 @@
});
disko.devices.mdadm = {
# boot = {
# type = "mdadm";
# level = 1;
# metadata = "1.0";
# content = {
# type = "filesystem";
# format = "vfat";
# mountpoint = "/boot";
# };
# };
boot = {
type = "mdadm";
level = 1;
metadata = "1.0";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
raid0 = {
type = "mdadm";
level = 0;

View file

@ -43,12 +43,10 @@
};
};
users = {
users.pim = {
users.users.pim = {
isNormalUser = true;
extraGroups = ["wheel" "docker" "input" "wireshark" "dialout"];
};
};
environment = {
systemPackages = with pkgs; [