add domain name to k3s tls-san

This commit is contained in:
alex 2024-02-06 21:50:30 -05:00
parent da4ce64a16
commit de5c6f0063
2 changed files with 67 additions and 112 deletions

View File

@ -6,7 +6,8 @@
{
imports =
[ # Include the results of the hardware scan.
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
@ -17,36 +18,50 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.extraPools = [ "alex1" ];
boot.zfs.forceImportRoot = false;
networking.hostName = "atauno"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.hostId = "ae3574b1"; # for zfs importing pools during boot
# Set your time zone.
time.timeZone = "America/New_York";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Define a user account. Don't forget to set a password with passwd.
users.users = {
alex = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [ git ];
};
matson = {
isNormalUser = true;
extraGroups = [ ];
};
};
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "ae3574b1";
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
];
boot.zfs.extraPools = [ "alex1" ];
services.k3s.enable = true;
# List services that you want to enable:
services.k3s.enable = true;
services.k3s.role = "server";
services.k3s.extraFlags = toString [
# "--kubelet-arg=v=4" # Optionally add additional args to k3s
"--tls-san=atauno.com"
];
services.samba-wsdd = {
# maKe shares visible for Windows clients
services.samba-wsdd = {
# make shares visible for Windows clients
enable = true;
openFirewall = true;
};
services.samba = {
};
services.samba = {
enable = true;
securityType = "user";
extraConfig = ''
@ -71,72 +86,9 @@ services.samba = {
"force create mode" = 774;
"force user" = "matson";
"force group" = "users";
};
};
};
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
services.openiscsi.enable = true;
services.openiscsi.name = "openiscsi-atauno";
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
];
};
users.users.matson = {
isNormalUser = true;
extraGroups = [ ];
};
users.users.family = {
isNormalUser = true;
extraGroups = [ ];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;

View File

@ -5,7 +5,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/50d2d351-846c-432d-8470-f004d9f0b186";
{
device = "/dev/disk/by-uuid/50d2d351-846c-432d-8470-f004d9f0b186";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/51D9-C3A6";
{
device = "/dev/disk/by-uuid/51D9-C3A6";
fsType = "vfat";
};