2024-02-20 03:23:20 +01:00
|
|
|
{ inputs, config, lib, pkgs, modulesPath, system, ... }: {
|
2023-11-25 07:17:29 +01:00
|
|
|
imports = [
|
2023-11-26 06:44:52 +01:00
|
|
|
inputs.nixos-hardware.nixosModules.framework-13th-gen-intel
|
2023-11-25 07:17:29 +01:00
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2023-11-30 12:33:54 +01:00
|
|
|
../../common/modules/secureboot.nix
|
2023-12-06 07:32:21 +01:00
|
|
|
../../common/modules/udev-rules.nix
|
2023-11-25 07:17:29 +01:00
|
|
|
../../common/services/fwupd.nix
|
2023-12-17 12:52:40 +01:00
|
|
|
../../common/modules/ssh-luks.nix
|
2024-01-14 05:26:18 +01:00
|
|
|
../../common/services/docker.nix
|
2024-01-12 08:43:50 +01:00
|
|
|
../../common/services/tailscale-autoconnect.nix
|
2023-12-19 03:17:00 +01:00
|
|
|
./disks.nix
|
2023-11-29 10:07:39 +01:00
|
|
|
./builder.nix
|
2023-12-01 13:25:48 +01:00
|
|
|
./wireguard.nix
|
2023-12-06 03:56:24 +01:00
|
|
|
./cron.nix
|
2023-12-19 13:27:26 +01:00
|
|
|
./firewall.nix
|
2023-12-18 09:50:52 +01:00
|
|
|
];
|
2023-11-25 07:17:29 +01:00
|
|
|
|
2023-12-11 11:52:52 +01:00
|
|
|
environment.systemPackages = [
|
2024-01-31 04:31:01 +01:00
|
|
|
inputs.deploy-rs.packages.${system}.deploy-rs
|
2023-12-27 04:41:12 +01:00
|
|
|
pkgs.distrobox
|
2023-12-11 11:52:52 +01:00
|
|
|
];
|
|
|
|
|
2024-03-13 03:48:40 +01:00
|
|
|
# backups-rpi4 cron job to back up sysctl.io's Docker files
|
|
|
|
# osaka-linode-01 cron job to copy certs for the DERP relay
|
2024-03-15 02:38:02 +01:00
|
|
|
# milan-linode-01 cron job to copy certs for the DERP relay
|
2024-03-13 03:48:40 +01:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKp2wgqFcr0LGaUXbom88/zK2631pysePUWIaCMljT0K root@backups-rpi4''
|
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkNFdEcYIrjss1Nz0tU/AX89hUMmxB/Vabvsa7A6E2K root@osaka-linode-01''
|
2024-03-15 05:25:48 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJsGufD7NIjmcb/gzGItcvExHNtfoopD4En/2xhYMBU1 root@milan-linode-01''
|
2024-03-13 03:48:40 +01:00
|
|
|
];
|
2023-12-30 14:35:19 +01:00
|
|
|
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
2023-12-30 14:11:44 +01:00
|
|
|
|
2023-11-26 03:01:38 +01:00
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "sd_mod" "uas" ];
|
2023-12-02 03:24:49 +01:00
|
|
|
boot.initrd.kernelModules = [ "r8152" ];
|
2023-11-26 03:01:38 +01:00
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
2023-11-30 12:20:41 +01:00
|
|
|
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
2023-11-25 07:17:29 +01:00
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
2023-11-26 03:01:38 +01:00
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2023-11-25 07:17:29 +01:00
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "Asia/Tokyo";
|
|
|
|
|
|
|
|
# Set the networking hostname:
|
2023-11-25 11:04:12 +01:00
|
|
|
networking.hostName = "framework-server";
|
2023-11-25 07:17:29 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
2023-12-01 09:56:08 +01:00
|
|
|
|
2023-12-02 14:36:39 +01:00
|
|
|
services.tailscale.extraUpFlags = [
|
|
|
|
"--advertise-exit-node"
|
|
|
|
"--advertise-routes=10.2.0.0/24"
|
|
|
|
];
|
|
|
|
|
2023-12-04 09:25:02 +01:00
|
|
|
boot.kernel.sysctl = {
|
|
|
|
"net.ipv4.ip_forward" = true;
|
|
|
|
};
|
2023-12-02 14:36:39 +01:00
|
|
|
}
|