70 lines
2.1 KiB
Nix
70 lines
2.1 KiB
Nix
{ config, pkgs, lib, ... }:
|
||
|
||
{
|
||
imports =
|
||
[
|
||
./hardware-configuration.nix
|
||
./services/factorio.nix
|
||
./services/http/index.nix
|
||
./services/monitoring.nix
|
||
./services/forgejo.nix
|
||
];
|
||
|
||
# Bootloader
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.loader.timeout = 1;
|
||
|
||
# Set up SSH unlocking
|
||
boot.kernelParams = [ "ip=dhcp" ];
|
||
boot.initrd = {
|
||
availableKernelModules = [ "e1000e" ];
|
||
network = {
|
||
enable = true;
|
||
flushBeforeStage2 = true; # Without this, stage2 IPv6 config is messed up?
|
||
ssh = {
|
||
enable = true;
|
||
port = 22;
|
||
authorizedKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhPyyqS3BGYor3zLbjc8hZuhem3mS8TNmvWogXcnz/b chandler@chandlerswift.com" ];
|
||
hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ];
|
||
shell = "/bin/cryptsetup-askpass";
|
||
};
|
||
};
|
||
};
|
||
|
||
boot.initrd.luks.devices."luks-48836129-1aa0-45c7-9fd1-6b053fa620b1".device = "/dev/disk/by-uuid/48836129-1aa0-45c7-9fd1-6b053fa620b1";
|
||
networking.hostName = "bert";
|
||
|
||
# Enable networking
|
||
networking.networkmanager.enable = true;
|
||
|
||
time.timeZone = "America/Chicago";
|
||
i18n.defaultLocale = "en_US.UTF-8";
|
||
services.xserver.xkb = {
|
||
layout = "us";
|
||
variant = "";
|
||
};
|
||
|
||
environment.systemPackages = with pkgs; [
|
||
rsync
|
||
];
|
||
|
||
# Enable the OpenSSH daemon.
|
||
services.openssh.enable = true;
|
||
users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhPyyqS3BGYor3zLbjc8hZuhem3mS8TNmvWogXcnz/b chandler@chandlerswift.com'' ];
|
||
|
||
networking.firewall.allowedTCPPorts = [
|
||
80 # Caddy
|
||
443 # Caddy
|
||
];
|
||
|
||
# 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 = "24.05"; # Did you read the comment?
|
||
|
||
}
|