Compare commits
No commits in common. "6f74a75ba3f550515898ea0ad33b2773e7db0e76" and "ecf3857ca846c3eed17bd3f42a73130899a04457" have entirely different histories.
6f74a75ba3
...
ecf3857ca8
3 changed files with 38 additions and 22 deletions
|
|
@ -1,6 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./disko.nix
|
||||
../../users/jalr
|
||||
|
|
@ -21,10 +23,10 @@
|
|||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelModules = ["kvm-intel"];
|
||||
kernelParams = [
|
||||
"console=ttyS0,115200"
|
||||
"console=tty1"
|
||||
|
|
@ -32,24 +34,26 @@
|
|||
|
||||
loader = {
|
||||
efi = {
|
||||
efiSysMountPoint = "/boot/efis/disk1";
|
||||
efiSysMountPoint = "/boot";
|
||||
canTouchEfiVariables = false;
|
||||
};
|
||||
generationsDir.copyKernels = true;
|
||||
grub = {
|
||||
devices = [ "/dev/sda" "/dev/sdb" ];
|
||||
devices = ["/dev/sda"];
|
||||
efiInstallAsRemovable = true;
|
||||
copyKernels = true;
|
||||
efiSupport = true;
|
||||
zfsSupport = true;
|
||||
mirroredBoots = [
|
||||
{
|
||||
path = "/boot1";
|
||||
devices = ["/dev/sdb"];
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
|
||||
terminal_input --append serial
|
||||
terminal_output --append serial
|
||||
'';
|
||||
extraInstallCommands = ''
|
||||
${pkgs.coreutils-full}/bin/cp -r ${config.boot.loader.efi.efiSysMountPoint}/EFI /boot/efis/disk2
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,10 +7,20 @@
|
|||
type = "filesystem";
|
||||
format = "vfat";
|
||||
inherit mountpoint;
|
||||
mountOptions = [
|
||||
"uid=0" "gid=0" "fmask=0077" "dmask=0077"
|
||||
"nodev" "nosuid" "noexec"
|
||||
"x-systemd.idle-timeout=1min" "x-systemd.automount" "noauto" "nofail" "noatime" "X-mount.mkdir"
|
||||
mountOptions = [
|
||||
"uid=0"
|
||||
"gid=0"
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
"nodev"
|
||||
"nosuid"
|
||||
"noexec"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"nofail"
|
||||
"noatime"
|
||||
"X-mount.mkdir"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
@ -27,7 +37,7 @@ in {
|
|||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
ESP = mkEfiPartition "/boot/efis/disk1";
|
||||
ESP = mkEfiPartition "/boot";
|
||||
nixos = {
|
||||
size = "100%";
|
||||
};
|
||||
|
|
@ -44,16 +54,17 @@ in {
|
|||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
ESP = mkEfiPartition "/boot/efis/disk2";
|
||||
ESP = mkEfiPartition "/boot1";
|
||||
nixos = {
|
||||
size = "100%";
|
||||
content = let
|
||||
content = let
|
||||
thisPartition = cfg.devices.disk.disk2.content.partitions.nixos.device;
|
||||
mirror = cfg.devices.disk.disk1.content.partitions.nixos.device;
|
||||
in {
|
||||
type = "btrfs";
|
||||
extraArgs = [
|
||||
"-f"
|
||||
"-m raid1"
|
||||
"-d raid1"
|
||||
"${mirror}"
|
||||
];
|
||||
|
|
@ -66,23 +77,23 @@ in {
|
|||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = ["compress-force=zstd:1" "noatime"];
|
||||
mountOptions = ["degraded" "compress-force=zstd:1" "noatime"];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = ["compress-force=zstd:1" "noatime" "nodev" "nosuid"];
|
||||
mountOptions = ["degraded" "compress-force=zstd:1" "noatime" "nodev" "nosuid"];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = ["compress-force=zstd:1" "noatime" "nodev"];
|
||||
mountOptions = ["degraded" "compress-force=zstd:1" "noatime" "nodev"];
|
||||
};
|
||||
"/log" = {
|
||||
mountpoint = "/var/log";
|
||||
mountOptions = ["compress-force=zstd:1" "noatime" "nodev" "nosuid"];
|
||||
mountOptions = ["degraded" "compress-force=zstd:1" "noatime" "nodev" "nosuid"];
|
||||
};
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = ["compress-force=zstd:1" "noatime" "nodev" "nosuid"];
|
||||
mountOptions = ["degraded" "compress-force=zstd:1" "noatime" "nodev" "nosuid"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,5 +47,6 @@
|
|||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cached-nix-shell
|
||||
git
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue