2024-09-05 22:22:18 +02:00
|
|
|
{lib, config, pkgs, ...}: {
|
2024-10-19 00:15:34 +02:00
|
|
|
lyn.sops.enable = true;
|
2024-09-05 22:22:18 +02:00
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-10-16 22:50:37 +02:00
|
|
|
nix.package = config.pkgsInstances.unstable.lix;
|
2024-10-16 16:57:55 +02:00
|
|
|
environment.variables.EDITOR = "nvim";
|
2024-09-05 22:22:18 +02:00
|
|
|
|
2024-10-18 23:01:33 +02:00
|
|
|
# TODO
|
2024-09-05 22:22:18 +02:00
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
2024-10-18 23:01:33 +02:00
|
|
|
# Firewall base config:
|
|
|
|
networking.firewall.enable = lib.mkDefault true;
|
|
|
|
networking.firewall.allowPing = true;
|
|
|
|
# SSH:
|
2024-09-05 22:22:18 +02:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
X11Forwarding = true;
|
2024-10-16 16:57:55 +02:00
|
|
|
PermitRootLogin = "yes";
|
2024-09-05 22:22:18 +02:00
|
|
|
PasswordAuthentication = false;
|
2024-10-19 01:35:36 +02:00
|
|
|
KbdInteractiveAuthentication = false;
|
2024-09-05 22:22:18 +02:00
|
|
|
};
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2024-10-18 23:01:33 +02:00
|
|
|
|
|
|
|
# Disable password checking for wheel group users so we can rely on ssh keys.
|
|
|
|
# WARNING: This has an security impact!
|
2024-09-05 22:22:18 +02:00
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
git
|
2024-09-17 02:46:45 +02:00
|
|
|
vim
|
|
|
|
neovim
|
2024-09-05 22:22:18 +02:00
|
|
|
wget
|
|
|
|
curl
|
|
|
|
htop
|
|
|
|
];
|
2024-10-18 23:01:33 +02:00
|
|
|
|
2024-10-29 08:55:56 +01:00
|
|
|
# Use encrypted Quad9 DNS
|
|
|
|
nameservers = [ "127.0.0.1" "::1" ];
|
|
|
|
services.dnscrypt-proxy2 = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
ipv6_servers = true;
|
|
|
|
require_dnssec = true;
|
|
|
|
|
|
|
|
sources.public-resolvers = {
|
|
|
|
urls = [
|
|
|
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
|
|
|
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
|
|
|
];
|
|
|
|
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
|
|
|
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
|
|
|
};
|
|
|
|
|
|
|
|
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
2024-11-09 21:04:28 +01:00
|
|
|
server_names = [ quad9-dnscrypt-ip4-nofilter-pri, quad9-dnscrypt-ip6-nofilter-pri];
|
2024-10-29 08:55:56 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
|
|
|
StateDirectory = "dnscrypt-proxy";
|
|
|
|
};
|
|
|
|
|
2024-10-18 23:01:33 +02:00
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
persistent = true;
|
|
|
|
options = "--delete-older-than 8d";
|
|
|
|
};
|
2024-09-06 02:47:41 +02:00
|
|
|
}
|