53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
|
# Edit this configuration file to define what should be installed on
|
||
|
# your system. Help is available in the configuration.nix(5) man page
|
||
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
||
|
|
||
|
{ config, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
imports =
|
||
|
[
|
||
|
./hardware.nix
|
||
|
];
|
||
|
|
||
|
boot.loader.systemd-boot.enable = true;
|
||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||
|
|
||
|
time.timeZone = "Europe/London";
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
vim
|
||
|
wget
|
||
|
k3s
|
||
|
git
|
||
|
];
|
||
|
services = {
|
||
|
openssh.enable = true;
|
||
|
k3s = {
|
||
|
enable = true;
|
||
|
role = "server";
|
||
|
extraFlags = toString [
|
||
|
"--secrets-encryption"
|
||
|
"--tls-san=192.168.50.229"
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking = {
|
||
|
hostName = "k3s";
|
||
|
domain = "gmem.ca";
|
||
|
firewall = {
|
||
|
enable = false;
|
||
|
allowedTCPPorts = [ 6443 80 443 ];
|
||
|
};
|
||
|
|
||
|
nftables.enable = true;
|
||
|
};
|
||
|
# Copy the NixOS configuration file and link it from the resulting system
|
||
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||
|
# accidentally delete configuration.nix.
|
||
|
system.copySystemConfiguration = true;
|
||
|
|
||
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||
|
|
||
|
}
|