2022-08-13 16:08:27 +00:00
|
|
|
|
{
|
2023-01-28 21:27:52 +00:00
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
2023-09-12 20:07:05 +00:00
|
|
|
|
flake,
|
2023-01-28 21:27:52 +00:00
|
|
|
|
...
|
2023-09-12 20:07:05 +00:00
|
|
|
|
}:
|
|
|
|
|
with lib; let
|
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
|
|
|
|
in {
|
2024-02-03 19:58:18 +00:00
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
2022-08-13 18:15:22 +00:00
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
2023-10-10 09:56:36 +00:00
|
|
|
|
services.openssh.openFirewall = true;
|
2023-10-09 20:52:28 +00:00
|
|
|
|
|
2023-11-05 18:42:25 +00:00
|
|
|
|
pub-solar.user.publicKeys = [
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBB5XaH02a6+TchnyQED2VwaltPgeFCbildbE2h6nF5e root@nachtigall"
|
|
|
|
|
];
|
|
|
|
|
|
2024-02-03 19:58:18 +00:00
|
|
|
|
boot.kernelParams = [
|
|
|
|
|
"boot.shell_on_fail=1"
|
2024-02-04 00:05:28 +00:00
|
|
|
|
# Hack so that network is considered up by boot.initrd.network and postCommands gets executed.
|
|
|
|
|
"ip=127.0.0.1:::::lo:none"
|
2024-02-03 19:58:18 +00:00
|
|
|
|
];
|
2024-08-18 22:22:59 +00:00
|
|
|
|
boot.initrd.availableKernelModules = ["tg3"];
|
2024-02-04 00:05:28 +00:00
|
|
|
|
boot.initrd.network = {
|
2024-02-03 19:58:18 +00:00
|
|
|
|
enable = true;
|
2024-02-04 00:05:28 +00:00
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 2222;
|
2024-03-25 18:12:45 +00:00
|
|
|
|
authorizedKeys = flake.self.publicKeys;
|
2024-02-04 00:05:28 +00:00
|
|
|
|
hostKeys = ["/persist/etc/secrets/initrd/ssh_host_ed25519_key"];
|
|
|
|
|
shell = "/bin/cryptsetup-askpass";
|
|
|
|
|
};
|
|
|
|
|
postCommands = ''
|
|
|
|
|
ip link set dev enp2s0f0 up
|
|
|
|
|
|
|
|
|
|
ip addr add 192.168.178.3/32 dev enp2s0f0
|
|
|
|
|
ip route add 192.168.178.1 dev enp2s0f0
|
|
|
|
|
ip route add default via 192.168.178.1 dev enp2s0f0
|
|
|
|
|
|
|
|
|
|
ip -6 addr add 2a02:908:5b1:e3c0:3::/128 dev enp2s0f0
|
|
|
|
|
ip -6 addr add fe80:b12f:acab:1312:acab:3::/128 dev enp2s0f0
|
|
|
|
|
'';
|
2024-02-03 19:58:18 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
|
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBZQSephFJU0NMbVbhwvVJ2/m6jcPYo1IsWCsoarqKin root@droppie
|
|
|
|
|
age.secrets."droppie-ssh-root.key" = {
|
2023-11-05 17:56:11 +00:00
|
|
|
|
file = "${flake.self}/secrets/droppie-ssh-root.key.age";
|
2023-09-12 20:07:05 +00:00
|
|
|
|
path = "/home/${psCfg.user.name}/.ssh/id_ed25519";
|
|
|
|
|
mode = "400";
|
|
|
|
|
owner = psCfg.user.name;
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-13 16:08:27 +00:00
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "21.11"; # Did you read the comment?
|
|
|
|
|
}
|