flake/modules/profiles/base.nix

79 lines
2.1 KiB
Nix
Raw Normal View History

2024-11-13 22:40:55 +01:00
{
lib,
config,
pkgs,
...
}: {
lyn.sops.enable = true;
2024-11-13 22:40:55 +01:00
nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true;
nix.package = config.pkgsInstances.unstable.lix;
nixpkgs.overlays = [inputs.lynpkgs.overlays.default];
environment.variables.EDITOR = "nvim";
2024-11-13 22:40:55 +01:00
2024-11-13 23:17:28 +01:00
#initialize mesh vpn secret
lyn.sops.secrets."all/meshnetwork/gossip_secret" = {};
2024-10-18 23:01:33 +02:00
# TODO
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:
services.openssh = {
2024-11-13 22:40:55 +01:00
enable = true;
settings = {
X11Forwarding = true;
PermitRootLogin = "yes";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
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!
security.sudo.wheelNeedsPassword = false;
2024-11-13 22:40:55 +01:00
environment.systemPackages = with pkgs; [
git
2024-09-17 02:46:45 +02:00
vim
2024-11-13 22:40:55 +01:00
neovim
wget
curl
htop
];
2024-10-29 08:55:56 +01:00
# Use encrypted Quad9 DNS
2024-11-13 22:40:55 +01:00
networking.nameservers = ["127.0.0.1" "::1"];
2024-10-29 08:55:56 +01:00
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-13 22:40:55 +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
}