nixos-config/config/default.nix

92 lines
2 KiB
Nix
Raw Normal View History

2022-06-12 16:39:15 +01:00
{
config,
pkgs,
lib,
2022-06-12 16:39:15 +01:00
...
}: {
2022-01-14 10:19:01 +01:00
imports = [
./zfs.nix
./users/darkkirb.nix
2022-04-13 11:29:06 +01:00
./users/root.nix
2022-01-14 14:03:14 +01:00
./nix.nix
2022-01-14 15:13:55 +01:00
./sops.nix
./wireguard
2022-01-15 16:09:02 +01:00
./home.nix
2022-01-15 18:11:38 +01:00
./services/restic.nix
2022-02-19 08:01:07 +01:00
./specialization.nix
./services/promtail.nix
2022-08-14 19:52:12 +01:00
./env.nix
2023-02-01 21:01:01 +01:00
./tailscale.nix
2022-01-14 10:19:01 +01:00
];
services.openssh.enable = true;
2022-06-13 12:42:55 +01:00
environment.systemPackages = with pkgs; [
git
];
2022-06-12 16:39:15 +01:00
networking.firewall.allowedTCPPorts = [22];
2022-01-24 09:12:50 +01:00
networking.firewall.allowedUDPPortRanges = [
{
from = 60000;
to = 61000;
}
];
2022-01-15 10:55:15 +01:00
2022-01-15 16:09:02 +01:00
users.defaultUserShell = pkgs.zsh;
2022-04-24 19:23:27 +01:00
# Enable zram swap in every case
zramSwap = {
enable = true;
};
2022-01-15 10:55:15 +01:00
# Prometheus node exporter
services.prometheus.exporters.node = {
enable = true;
enabledCollectors = [
"interrupts"
"lnstat"
"mountstats"
"network_route"
"ntp"
"processes"
"systemd"
"tcpstat"
];
2023-02-02 21:34:19 +01:00
listenAddress = "0.0.0.0";
2022-01-15 10:55:15 +01:00
};
2022-06-12 16:39:15 +01:00
networking.firewall.interfaces."wg0".allowedTCPPorts = [config.services.prometheus.exporters.node.port];
2022-01-15 12:57:44 +01:00
2022-06-12 16:39:15 +01:00
environment.pathsToLink = ["/share/zsh"];
2022-01-18 11:59:26 +01:00
console.keyMap = "neo";
2022-01-18 14:38:04 +01:00
security.sudo.extraConfig = ''
Defaults env_keep += "TMUX"
'';
2022-02-01 21:22:17 +01:00
2022-02-02 11:42:00 +01:00
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
2022-04-13 11:29:06 +01:00
users.mutableUsers = false;
2022-06-12 16:39:15 +01:00
boot.kernelParams = ["nohibernate"];
2022-12-14 10:46:40 +01:00
sops.secrets."root/aws/credentials" = {
sopsFile = ../secrets/shared.yaml;
owner = "root";
key = "aws/credentials";
path = "/root/.aws/credentials";
};
2023-01-14 20:58:07 +01:00
sops.secrets."root/ssh/builder_id_ed25519" = {
2023-01-14 14:57:00 +01:00
sopsFile = ../secrets/shared.yaml;
owner = "root";
key = "ssh/builder_id_ed25519";
2023-01-14 20:58:07 +01:00
path = "/root/.ssh/builder_id_ed25519";
};
sops.secrets."darkkirb/ssh/builder_id_ed25519" = {
sopsFile = ../secrets/shared.yaml;
owner = "darkkirb";
key = "ssh/builder_id_ed25519";
path = "/home/darkkirb/.ssh/builder_id_ed25519";
2023-01-14 14:57:00 +01:00
};
2022-12-15 11:13:10 +01:00
networking.nameservers = ["fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49" "fd0d:a262:1fa6:e621:746d:4523:5c04:1453"];
2022-01-14 10:19:01 +01:00
}