61 lines
1.9 KiB
Nix
61 lines
1.9 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
flake,
|
|
...
|
|
}:
|
|
with lib; let
|
|
psCfg = config.pub-solar;
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
|
in {
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
boot.kernelParams = [
|
|
"boot.shell_on_fail=1"
|
|
# Hack so that network is considered up by boot.initrd.network and postCommands gets executed.
|
|
"ip=127.0.0.1:::::lo:none"
|
|
];
|
|
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_net" ];
|
|
boot.initrd.network = {
|
|
enable = true;
|
|
ssh = {
|
|
enable = true;
|
|
port = 2222;
|
|
hostKeys = [ /boot/initrd-ssh-key ];
|
|
authorizedKeys = flake.self.publicKeys;
|
|
shell = "/bin/cryptsetup-askpass";
|
|
};
|
|
postCommands = ''
|
|
ip link set dev enp1s0 up
|
|
|
|
ip addr add 128.140.109.213/32 dev enp1s0
|
|
ip route add 172.31.1.1 dev enp1s0
|
|
ip route add default via 172.31.1.1 dev enp1s0
|
|
|
|
ip -6 addr add 128.140.109.213/128 dev enp1s0
|
|
ip -6 addr add 2a01:4f8:c2c:b60::/64 dev enp1s0
|
|
ip -6 route add fe80::1 dev enp1s0
|
|
ip -6 route add default via fe80::1 dev enp1s0
|
|
'';
|
|
};
|
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
# accidentally delete configuration.nix.
|
|
# system.copySystemConfiguration = true;
|
|
|
|
# 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 = "23.05"; # Did you read the comment?
|
|
}
|