2024-01-12 16:43:50 +09:00
|
|
|
{ inputs, config, lib, pkgs, modulesPath, desktop, username, hostname, platform, ... }: {
|
2023-11-25 15:17:29 +09:00
|
|
|
imports = [
|
2023-11-26 14:44:52 +09:00
|
|
|
inputs.nixos-hardware.nixosModules.framework-13th-gen-intel
|
2023-11-25 15:17:29 +09:00
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2023-11-30 20:33:54 +09:00
|
|
|
../../common/modules/secureboot.nix
|
2023-12-06 15:32:21 +09:00
|
|
|
../../common/modules/udev-rules.nix
|
2023-11-25 15:17:29 +09:00
|
|
|
../../common/services/fwupd.nix
|
2023-12-17 20:52:40 +09:00
|
|
|
../../common/modules/ssh-luks.nix
|
2024-01-14 13:26:18 +09:00
|
|
|
../../common/services/docker.nix
|
2024-01-12 16:43:50 +09:00
|
|
|
../../common/services/tailscale-autoconnect.nix
|
2023-12-19 11:17:00 +09:00
|
|
|
./disks.nix
|
2023-11-29 18:07:39 +09:00
|
|
|
./builder.nix
|
2023-12-01 21:25:48 +09:00
|
|
|
./wireguard.nix
|
2023-12-06 11:56:24 +09:00
|
|
|
./cron.nix
|
2023-12-19 21:27:26 +09:00
|
|
|
./firewall.nix
|
2023-12-18 17:50:52 +09:00
|
|
|
];
|
2023-11-25 15:17:29 +09:00
|
|
|
|
2023-12-11 19:52:52 +09:00
|
|
|
environment.systemPackages = [
|
|
|
|
inputs.deploy-rs.packages.${platform}.deploy-rs
|
2023-12-27 12:41:12 +09:00
|
|
|
pkgs.distrobox
|
2023-12-11 19:52:52 +09:00
|
|
|
];
|
|
|
|
|
2023-12-30 22:11:44 +09:00
|
|
|
# backups-rpi4 cron job to back up sysctl.io's Docker files
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [ ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKp2wgqFcr0LGaUXbom88/zK2631pysePUWIaCMljT0K root@backups-rpi4'' ];
|
2023-12-30 22:35:19 +09:00
|
|
|
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
2023-12-30 22:11:44 +09:00
|
|
|
|
2023-12-30 22:32:24 +09:00
|
|
|
# steam, etc
|
2023-12-04 11:56:02 +09:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2023-11-25 15:17:29 +09:00
|
|
|
|
2023-11-26 11:01:38 +09:00
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "sd_mod" "uas" ];
|
2023-12-02 11:24:49 +09:00
|
|
|
boot.initrd.kernelModules = [ "r8152" ];
|
2023-11-26 11:01:38 +09:00
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
2023-11-30 20:20:41 +09:00
|
|
|
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
|
2023-11-25 15:17:29 +09:00
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2023-11-26 11:01:38 +09:00
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2023-11-25 15:17:29 +09: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 19:04:12 +09:00
|
|
|
networking.hostName = "framework-server";
|
2023-11-25 15:17:29 +09:00
|
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
2023-12-01 17:56:08 +09:00
|
|
|
|
2023-12-02 22:36:39 +09:00
|
|
|
services.tailscale.extraUpFlags = [
|
|
|
|
"--advertise-exit-node"
|
|
|
|
"--advertise-routes=10.2.0.0/24"
|
|
|
|
];
|
|
|
|
|
2023-12-04 17:25:02 +09:00
|
|
|
boot.kernel.sysctl = {
|
|
|
|
"net.ipv4.ip_forward" = true;
|
|
|
|
};
|
2023-12-02 22:36:39 +09:00
|
|
|
}
|