rename virtual machine folder
This commit is contained in:
1 parent
cb4620a94a
commit
8d7c1ae7ec
6 files changed
+2
-5
No files matched your search
@@ -0,0 +1,86 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
meta,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Allow login and remote control of VM
|
||||
users.users.admin = {
|
||||
isNormalUser = true;
|
||||
hashedPassword = "$y$j9T$WI7E.NXw4qar1DXodrVWG/$gUErw1R6W8k1UFm49C5.vEc9MT5RcKW0BKitURNqbl/";
|
||||
extraGroups = [ "wheel" ];
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAcofS7u0BYzRBn0i4RuXPHWpnvk3nEbGo9B9ghsR4oL roydumblauskas@gmail.com"
|
||||
];
|
||||
};
|
||||
|
||||
# Don't allow password login
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
kitty
|
||||
kubectl
|
||||
nginx
|
||||
tmux
|
||||
vim
|
||||
wget
|
||||
];
|
||||
|
||||
# ================================ #
|
||||
# K3S SERVICE #
|
||||
# ================================ #
|
||||
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
disable = [ "traefik" ];
|
||||
role = "server";
|
||||
|
||||
# only enable the service on k3s when roughly finalized
|
||||
# Until then use a vm, as k3s is persisted
|
||||
extraFlags = [
|
||||
"--data-dir=/var/lib/rancher/k3s"
|
||||
"--cluster-cidr=10.42.0.0/20"
|
||||
];
|
||||
};
|
||||
|
||||
# ================================ #
|
||||
# PSQL SERVICE #
|
||||
# ================================ #
|
||||
|
||||
# Postgresql/postgrest for row storage (not on k3s)
|
||||
services.postgresql-db = {
|
||||
enable = true;
|
||||
dataDir = "/var/lib/postgresql";
|
||||
port = 5432;
|
||||
credentialsFile = "";
|
||||
databases = [
|
||||
"test"
|
||||
];
|
||||
ipMasks = [
|
||||
"10.42.0.0/20" # k3s pod mask
|
||||
];
|
||||
};
|
||||
|
||||
# To stop the complaining
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user