mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-07-02 23:47:18 +02:00
Transitionning lisa to uncrypted zfs
This commit is contained in:
parent
4c0658d6c8
commit
e68bf96cf8
2 changed files with 33 additions and 7 deletions
|
@ -36,7 +36,6 @@
|
||||||
networking.hostName = "lisa";
|
networking.hostName = "lisa";
|
||||||
networking.interfaces.ens20.useDHCP = false;
|
networking.interfaces.ens20.useDHCP = false;
|
||||||
networking.interfaces.ens20.ipv4.addresses = [{ address = "212.129.40.11"; prefixLength = 32; }];
|
networking.interfaces.ens20.ipv4.addresses = [{ address = "212.129.40.11"; prefixLength = 32; }];
|
||||||
#networking.defaultGateway = { interface = "ens20"; };
|
|
||||||
networking.localCommands = ''
|
networking.localCommands = ''
|
||||||
ip r del default || ip r add default dev ens20
|
ip r del default || ip r add default dev ens20
|
||||||
'';
|
'';
|
||||||
|
@ -46,5 +45,11 @@
|
||||||
address = "2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb";
|
address = "2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb";
|
||||||
prefixLength = 120;
|
prefixLength = 120;
|
||||||
}];
|
}];
|
||||||
system.stateVersion = "20.09";
|
|
||||||
|
networking.hostId = "fbb334ae";
|
||||||
|
services.zfs.autoSnapshot.enable = true;
|
||||||
|
services.zfs.autoScrub.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
system.stateVersion = "21.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
{
|
{
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
|
||||||
|
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -8,18 +10,37 @@
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/eaec3978-f462-4634-95e6-06d59512deb8";
|
device = "zroot/root";
|
||||||
fsType = "ext4";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/EAD2-51DB";
|
device = "/dev/disk/by-uuid/F8EA-A684";
|
||||||
fsType = "vfat";
|
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"; }];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue