2024-01-12 08:43:50 +01:00
|
|
|
{ inputs, config, lib, pkgs, modulesPath, desktop, username, hostname, platform, ... }: {
|
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-12 12:25:51 +01:00
|
|
|
../../common/services/podman.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 = [
|
|
|
|
inputs.deploy-rs.packages.${platform}.deploy-rs
|
2023-12-27 04:41:12 +01:00
|
|
|
pkgs.distrobox
|
2023-12-11 11:52:52 +01:00
|
|
|
];
|
|
|
|
|
2023-12-30 14:11:44 +01: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 14:35:19 +01:00
|
|
|
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
2023-12-30 14:11:44 +01:00
|
|
|
|
2023-12-30 14:32:24 +01:00
|
|
|
# steam, etc
|
2023-12-04 03:56:02 +01:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2023-11-25 07:17:29 +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;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
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
|
|
|
}
|