server10: new

This commit is contained in:
Sandro - 2024-01-07 03:40:39 +01:00
parent 9daa01fe2b
commit e845376d74
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 63 additions and 36 deletions

View File

@ -8,7 +8,7 @@
c3d2 = {
baremetal = true;
deployment.microvmBaseZfsDataset = "server10/vm";
deployment.microvmBaseZfsDataset = "server10-root/vm";
hq.statistics.enable = true;
};
@ -31,7 +31,7 @@
# NOTE: stop the raid with: mdadm --stop /dev/md127
disko.disks = [ {
device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_1TB_S3Z9NB0M203733F";
name = "server10";
name = "root";
partitionTableFormat = "msdos";
withBoot = true;
withLuks = true;

View File

@ -5,49 +5,76 @@
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = [ "ext2" "zfs" ];
boot.zfs.devNodes = "/dev/";
boot.initrd.luks.devices."server10-root".device = "/dev/disk/by-uuid/b4904afe-22b3-4abe-bd53-049817c1332f";
fileSystems."/" =
{ device = "server10/nixos";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "server10/nixos/nix";
fsType = "zfs";
};
fileSystems."/nix/var" =
{ device = "server10/nixos/nix/var";
fsType = "zfs";
};
fileSystems."/nix/store" =
{ device = "server10/nixos/nix/store";
fsType = "zfs";
};
fileSystems."/var" =
{ device = "server10/nixos/var";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "server10/home";
{ device = "server10-root/root";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/b13a876b-2488-47a3-b9bd-3b03fbac6c85";
fsType = "ext2";
{ device = "/dev/disk/by-uuid/EB9B-15AA";
fsType = "vfat";
};
swapDevices = [ ];
fileSystems."/etc" =
{ device = "server10-root/data/etc";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/home" =
{ device = "server10-root/home";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/nix" =
{ device = "server10-root/nix";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/nix/store" =
{ device = "server10-root/nix/store";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/nix/var" =
{ device = "server10-root/nix/var";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/var/backup" =
{ device = "server10-root/data/backup";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/var/lib" =
{ device = "server10-root/data/lib";
fsType = "zfs";
options = [ "zfsutil" ];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0f1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}