Transitionning lisa to uncrypted zfs

This commit is contained in:
Julien Malka 2022-01-12 23:40:17 +01:00
parent 33971396f3
commit 5e1fe991c1
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F
8 changed files with 88 additions and 62 deletions

View file

@ -1,6 +1,8 @@
{ pkgs, config, lib, ... }:
{
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
@ -8,18 +10,37 @@
boot.loader.efi.canTouchEfiVariables = true;
fileSystems."/" =
{
device = "/dev/disk/by-uuid/eaec3978-f462-4634-95e6-06d59512deb8";
fsType = "ext4";
device = "zroot/root";
fsType = "zfs";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/EAD2-51DB";
device = "/dev/disk/by-uuid/F8EA-A684";
fsType = "vfat";
};
swapDevices = [];
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
port = 2222;
hostKeys = [ /boot/initrd-ssh-key ];
authorizedKeys = lib.splitString "\n"
(builtins.readFile (pkgs.fetchurl {
url = "https://github.com/JulienMalka.keys";
sha256 = "sha256-nBgn7jOqi/nPHhTy3x/oirL+A4X2gbmwy1NXLZhV99M=";
}));
};
postCommands = ''
zpool import zroot
echo "zfs load-key -a; killall zfs" >> /root/.profile
'';
};
swapDevices =
[{ device = "/dev/disk/by-uuid/c19ec918-ba8c-4bab-9ee0-831465cb432e"; }];