This commit is contained in:
2026-03-29 16:41:34 -03:00
parent 45ed719d7d
commit fd10ef1b32
22 changed files with 510 additions and 241 deletions
+16 -12
View File
@@ -4,7 +4,7 @@
networking = {
networkmanager.enable = true;
interfaces.enp9s0.wakeOnLan.enable = true;
firewall.allowedTCPPorts = [ ];
firewall.allowedTCPPorts = [ 22 ];
firewall.allowedUDPPorts = [
];
};
@@ -28,19 +28,23 @@
## Definir fuso horário
time.timeZone = "America/Bahia";
## Configurações de idioma e localidade
i18n.defaultLocale = "pt_BR.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "pt_BR.UTF-8";
LC_IDENTIFICATION = "pt_BR.UTF-8";
LC_MEASUREMENT = "pt_BR.UTF-8";
LC_MONETARY = "pt_BR.UTF-8";
LC_NAME = "pt_BR.UTF-8";
LC_NUMERIC = "pt_BR.UTF-8";
LC_PAPER = "pt_BR.UTF-8";
LC_TELEPHONE = "pt_BR.UTF-8";
LC_TIME = "pt_BR.UTF-8";
i18n = {
defaultLocale = "pt_BR.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "pt_BR.UTF-8";
LC_IDENTIFICATION = "pt_BR.UTF-8";
LC_MEASUREMENT = "pt_BR.UTF-8";
LC_MONETARY = "pt_BR.UTF-8";
LC_NAME = "pt_BR.UTF-8";
LC_NUMERIC = "pt_BR.UTF-8";
LC_PAPER = "pt_BR.UTF-8";
LC_TELEPHONE = "pt_BR.UTF-8";
LC_TIME = "pt_BR.UTF-8";
};
};
## Configurar layout do teclado no X11 e console
services.xserver.xkb = {
layout = "br";
+1
View File
@@ -5,5 +5,6 @@
./nixhelper.nix
./nvidia.nix
./patchs.nix
./self-host.nix
];
}
+2 -2
View File
@@ -30,8 +30,8 @@
auto-optimise-store = true;
extra-sandbox-paths = [ "/var/cache/ccache" ];
## cache kernel
substituters = [ "https://attic.xuyh0120.win/lantian" ];
trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ];
substituters = ["https://attic.xuyh0120.win/lantian"];
trusted-public-keys = ["lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="];
};
## Lix
+10
View File
@@ -8,6 +8,16 @@
nvidia.open = false; ## Se sua placa for pascal pra cima troque isso para true
};
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "580.142";
sha256_64bit = "sha256-IJFfzz/+icNVDPk7YKBKKFRTFQ2S4kaOGRGkNiBEdWM=";
sha256_aarch64 = lib.fakeSha256;
openSha256 = lib.fakeSha256;
settingsSha256 = "sha256-BnrIlj5AvXTfqg/qcBt2OS9bTDDZd3uhf5jqOtTMTQM=";
persistencedSha256 = lib.fakeSha256;
};
## Teste sobre o nvk nao recomendo usar
+51
View File
@@ -0,0 +1,51 @@
{ config, lib, inputs, pkgs, ... }: {
## tailscale
services.tailscale = {
enable = true;
extraUpFlags = [ "--advertise-exit-node" "--ssh"];
};
networking.nftables.enable = true;
networking.firewall = {
enable = true;
allowedTCPPorts = [ 47984 47989 48910 ];
allowedUDPPortRanges = [
{ from = 47998; to = 48000; }
{ from = 48002; to = 48010; }
];
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
## Configuraçao de Docker
boot.kernel.sysctl = {
"net.ipv4.ip_unprivileged_port_start" = 53;
"net.ipv6.conf.all.forwarding" = true;
};
users.users.gui.extraGroups = [ "docker" ];
users.groups.docker.gid = 131;
virtualisation.docker = {
enable = true;
#rootless = {
# enable = true;
# setSocketVariable = true;
#};
};
services.openssh = {
enable = true;
};
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
}