70 lines
1.6 KiB
Nix
70 lines
1.6 KiB
Nix
|
{ pkgs, ... }: {
|
||
|
imports = [
|
||
|
./hardware-configuration.nix
|
||
|
../common/users/m3tam3re
|
||
|
../common/base
|
||
|
./services
|
||
|
];
|
||
|
|
||
|
boot.loader.grub.enable = true;
|
||
|
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||
|
|
||
|
services.openssh.enable = true;
|
||
|
services.openssh.settings.PasswordAuthentication = false;
|
||
|
networking = {
|
||
|
hostName = "m3-r1";
|
||
|
firewall.enable = true;
|
||
|
firewall.allowedTCPPortRanges = [{
|
||
|
from = 3000;
|
||
|
to = 3100;
|
||
|
}];
|
||
|
firewall.allowedTCPPorts = [ 53 80 443 5432 3306 3478 ];
|
||
|
firewall.allowedUDPPorts = [ 53 51820 41641 ];
|
||
|
firewall.allowedUDPPortRanges = [{
|
||
|
from = 3478;
|
||
|
to = 3481;
|
||
|
}];
|
||
|
};
|
||
|
programs.fish.enable = true;
|
||
|
age = {
|
||
|
secrets = {
|
||
|
mj-smtp-user.file = ../../secrets/mj-smtp-user.age;
|
||
|
mj-smtp-pass.file = ../../secrets/mj-smtp-pass.age;
|
||
|
tailscale-key.file = ../../secrets/tailscale-key.age;
|
||
|
|
||
|
vaultwarden-env = {
|
||
|
file = ../../secrets/vaultwarden-env.age;
|
||
|
mode = "770";
|
||
|
};
|
||
|
|
||
|
n8n-env = {
|
||
|
file = ../../secrets/n8n-env.age;
|
||
|
mode = "770";
|
||
|
};
|
||
|
|
||
|
traefik-env = {
|
||
|
file = ../../secrets/traefik-env.age;
|
||
|
mode = "770";
|
||
|
owner = "traefik";
|
||
|
};
|
||
|
|
||
|
searx-environmentFile = {
|
||
|
file = ../../secrets/searx-environmentFile.age;
|
||
|
mode = "770";
|
||
|
owner = "searx";
|
||
|
};
|
||
|
|
||
|
};
|
||
|
identityPaths = [ "/root/.ssh/lkk-nix-1" ];
|
||
|
};
|
||
|
|
||
|
nix = {
|
||
|
gc = {
|
||
|
automatic = true;
|
||
|
options = "--delete-older-than 30d";
|
||
|
};
|
||
|
optimise.automatic = true;
|
||
|
};
|
||
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||
|
}
|