nix/nixos/hosts/osaka-linode-01/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

2023-12-05 05:27:06 +01:00
{ config, lib, pkgs, modulesPath, desktop, username, ... }: {
imports = [
2023-12-05 14:01:33 +01:00
(modulesPath + "/profiles/qemu-guest.nix")
2023-12-06 11:23:29 +01:00
./firewall.nix
# ./xinetd.nix
2023-12-05 05:27:06 +01:00
./wireguard.nix
];
2023-12-05 14:01:33 +01:00
2023-12-05 14:24:29 +01:00
boot.loader.grub.enable = true;
2023-12-13 03:45:25 +01:00
# boot.loader.grub.device = "/dev/sda";
2023-12-05 14:01:33 +01:00
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
swapDevices = [ { device = "/dev/disk/by-label/linode-swap"; } ];
2023-12-05 05:27:06 +01:00
# Distributed Builds
nix.distributedBuilds = true;
nixpkgs.config.allowUnfree = false;
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
time.timeZone = "Asia/Tokyo";
networking.hostName = "osaka-linode-01";
# networking.firewall.allowedTCPPorts = [ 22 ];
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
# Set up the secrets file:
sops.secrets."tailscale_keys/osaka-linode-01" = {
owner = "root";
sopsFile = ../../../secrets/tailscale.yaml;
restartUnits = [
"tailscaled.service"
"tailscaled-autoconnect.service"
];
};
services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/osaka-linode-01";
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
}