Compare commits
No commits in common. "8d6f91ea6fb78bba6f06cb8e3c5731fe52844bf7" and "6e7dd508d0eadaad943a94c1861da0413e661690" have entirely different histories.
8d6f91ea6f
...
6e7dd508d0
|
@ -6,21 +6,23 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# ZFS remote unlocking
|
# ZFS remote unlocking
|
||||||
|
boot.initrd.systemd.enable = true;
|
||||||
boot.initrd.availableKernelModules = [ "igb" ];
|
boot.initrd.availableKernelModules = [ "igb" ];
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"ip=192.168.0.42::192.168.0.1:255.255.252.0:phoenix-initrd:eno2:off:192.168.0.1"
|
"ip=192.168.0.42::192.168.0.1:255.255.252.0:phoenix-initrd:eno2:off:192.168.0.1"
|
||||||
];
|
];
|
||||||
boot.initrd.systemd.services.zfsunlock = {
|
boot.initrd.network = {
|
||||||
description = "Unlock ZFS pools";
|
enable = true;
|
||||||
wantedBy = [
|
ssh = {
|
||||||
"initrd.target"
|
enable = true;
|
||||||
|
port = 2222;
|
||||||
|
hostKeys = [
|
||||||
|
/boot-1/initrd-ssh-key
|
||||||
|
/boot-2/initrd-ssh-key
|
||||||
];
|
];
|
||||||
before = [
|
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||||
"zfs-import-zroot.service"
|
};
|
||||||
];
|
postCommands = ''
|
||||||
unitConfig.DefaultDependencies = "no";
|
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
script = ''
|
|
||||||
cat <<EOF > /root/.profile
|
cat <<EOF > /root/.profile
|
||||||
if pgrep -x "zfs" > /dev/null
|
if pgrep -x "zfs" > /dev/null
|
||||||
then
|
then
|
||||||
|
@ -36,18 +38,6 @@ in
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
boot.initrd.network = {
|
|
||||||
enable = true;
|
|
||||||
ssh = {
|
|
||||||
enable = true;
|
|
||||||
port = 2222;
|
|
||||||
hostKeys = [
|
|
||||||
/boot-1/initrd-ssh-key
|
|
||||||
/boot-2/initrd-ssh-key
|
|
||||||
];
|
|
||||||
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# ZFS options from https://nixos.wiki/wiki/NixOS_on_ZFS
|
# ZFS options from https://nixos.wiki/wiki/NixOS_on_ZFS
|
||||||
networking.hostId = "42069420";
|
networking.hostId = "42069420";
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
vim
|
vim
|
||||||
git
|
git
|
||||||
curl
|
curl
|
||||||
btop
|
htop
|
||||||
rclone
|
rclone
|
||||||
screen
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue