nixfiles/hosts/hetzner-vm/hetzner-vm.nix

69 lines
1.5 KiB
Nix
Raw Normal View History

2021-12-28 15:09:51 +00:00
{ modulesPath, tree, config, pkgs, lib, ... }:
{
imports = with tree; [
2021-12-28 22:59:28 +00:00
users.root
users.chaos
2021-12-28 21:42:46 +00:00
2021-12-29 16:21:53 +00:00
profiles.base
2021-12-28 15:09:51 +00:00
profiles.tailscale
profiles.sshd
2021-12-28 21:42:46 +00:00
hosts.hetzner-vm.services.restic
2021-12-28 21:42:46 +00:00
hosts.hetzner-vm.services.nginx
2021-12-28 16:00:56 +00:00
hosts.hetzner-vm.services.invidious
2021-12-28 21:42:46 +00:00
hosts.hetzner-vm.services.vault
2022-01-03 21:13:15 +00:00
hosts.hetzner-vm.services.quassel
2022-01-23 10:30:56 +00:00
hosts.hetzner-vm.services.mpd
hosts.hetzner-vm.services.storage-sftp
2021-12-28 21:42:46 +00:00
2021-12-28 15:09:51 +00:00
(modulesPath + "/profiles/qemu-guest.nix")
2022-04-11 12:26:28 +01:00
../../extras/laura-ssh-root.nix
2021-12-28 15:09:51 +00:00
];
home-manager.users.root = {
imports = with tree; [ home.base home.dev.small ];
};
home-manager.users.chaos = {
imports = with tree; [ home.base home.dev.small ];
2021-12-28 15:09:51 +00:00
};
2022-05-09 09:03:00 +01:00
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 1d";
};
2021-12-28 15:09:51 +00:00
networking.hostName = "hetzner-vm";
time.timeZone = "Europe/London";
2021-12-28 16:00:56 +00:00
networking.firewall.enable = true;
networking.firewall.allowPing = true;
2021-12-28 16:00:56 +00:00
networking.firewall.allowedTCPPorts = [ 22 ];
networking.enableIPv6 = true;
networking.usePredictableInterfaceNames = false;
networking.dhcpcd.enable = true;
systemd.network = {
enable = true;
networks.eth0 = {
name = "eth0";
2021-12-29 13:17:01 +00:00
address = [ "2a01:4f9:c010:8beb::/64" ];
gateway = [ "fe80::1" ];
};
};
2021-12-28 15:09:51 +00:00
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.initrd.kernelModules = [ "nvme" ];
2021-12-28 22:06:26 +00:00
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
2021-12-28 15:09:51 +00:00
system.stateVersion = "21.11";
}