2026-02-28 00:06:25 +00:00
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
|
|
2026-03-01 01:24:45 +00:00
|
|
|
let
|
|
|
|
|
pinnedK8s = lib.attrByPath [ "kubernetes_1_31" ] pkgs.kubernetes pkgs;
|
|
|
|
|
in
|
|
|
|
|
|
2026-02-28 00:06:25 +00:00
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
lib.optional (builtins.pathExists ./hardware-configuration.nix)
|
|
|
|
|
./hardware-configuration.nix;
|
|
|
|
|
|
2026-03-01 01:24:45 +00:00
|
|
|
networking.hostName = "k8s-base-template";
|
2026-03-08 20:12:03 +00:00
|
|
|
networking.useDHCP = lib.mkDefault true;
|
2026-03-08 05:16:19 +00:00
|
|
|
networking.useNetworkd = true;
|
2026-02-28 00:06:25 +00:00
|
|
|
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
|
|
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
|
|
|
boot.loader.grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
device = "/dev/sda";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.qemuGuest.enable = true;
|
2026-03-08 05:16:19 +00:00
|
|
|
services.cloud-init.enable = true;
|
|
|
|
|
services.cloud-init.network.enable = true;
|
2026-02-28 00:06:25 +00:00
|
|
|
services.openssh.enable = true;
|
|
|
|
|
services.openssh.settings = {
|
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
|
PermitRootLogin = "prohibit-password";
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-01 01:24:45 +00:00
|
|
|
boot.kernelModules = [ "overlay" "br_netfilter" ];
|
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
|
"net.ipv4.ip_forward" = 1;
|
|
|
|
|
"net.bridge.bridge-nf-call-iptables" = 1;
|
|
|
|
|
"net.bridge.bridge-nf-call-ip6tables" = 1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
virtualisation.containerd.enable = true;
|
|
|
|
|
virtualisation.containerd.settings = {
|
|
|
|
|
plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options.SystemdCgroup = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = lib.mkForce [ ];
|
|
|
|
|
|
|
|
|
|
nix.settings = {
|
|
|
|
|
trusted-users = [ "root" "micqdf" ];
|
|
|
|
|
auto-optimise-store = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix.gc = {
|
|
|
|
|
automatic = true;
|
|
|
|
|
dates = "daily";
|
|
|
|
|
options = "--delete-older-than 3d";
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-28 00:06:25 +00:00
|
|
|
programs.fish.enable = true;
|
|
|
|
|
|
|
|
|
|
users.users.micqdf = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
|
shell = pkgs.fish;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
btop
|
2026-03-01 01:24:45 +00:00
|
|
|
cni-plugins
|
|
|
|
|
conntrack-tools
|
|
|
|
|
containerd
|
|
|
|
|
cri-tools
|
2026-02-28 00:06:25 +00:00
|
|
|
curl
|
|
|
|
|
dig
|
2026-03-01 01:24:45 +00:00
|
|
|
ebtables
|
|
|
|
|
ethtool
|
2026-02-28 00:06:25 +00:00
|
|
|
eza
|
|
|
|
|
fd
|
|
|
|
|
fzf
|
|
|
|
|
git
|
|
|
|
|
htop
|
2026-03-01 01:24:45 +00:00
|
|
|
iproute2
|
|
|
|
|
iptables
|
|
|
|
|
ipvsadm
|
2026-02-28 00:06:25 +00:00
|
|
|
jq
|
2026-03-01 01:24:45 +00:00
|
|
|
kubernetes-helm
|
|
|
|
|
pinnedK8s
|
2026-02-28 00:06:25 +00:00
|
|
|
ripgrep
|
2026-03-01 01:24:45 +00:00
|
|
|
socat
|
2026-02-28 00:06:25 +00:00
|
|
|
tree
|
|
|
|
|
unzip
|
|
|
|
|
vim
|
2026-02-28 00:44:08 +00:00
|
|
|
neovim
|
2026-02-28 00:06:25 +00:00
|
|
|
wget
|
|
|
|
|
];
|
|
|
|
|
|
2026-02-28 00:44:08 +00:00
|
|
|
system.stateVersion = "25.05";
|
2026-02-28 00:06:25 +00:00
|
|
|
}
|