stonehenge: update config

This commit is contained in:
Leonardo Eugênio 2026-01-01 22:10:14 -03:00
parent c36c1f618b
commit a8d608ed16
6 changed files with 109 additions and 3 deletions

View file

@ -0,0 +1,33 @@
{ pkgs, ... }:
let
vagrantScript = pkgs.writeScriptBin "vagrant-vnode-05" ''
#!${pkgs.bash}/bin/bash
set -euo pipefail
export PATH="${pkgs.lib.makeBinPath (with pkgs; [ vagrant curl openssh virtualbox ])}:$PATH"
export VNODE_NAME=vnode-05
cd /home/user/kubernetes-cluster/vnodes
exec ${pkgs.vagrant}/bin/vagrant up
'';
in
{
environment.systemPackages = with pkgs; [ vagrant curl openssh ];
users.users.user.extraGroups = [ "vboxusers" ];
systemd.services.vagrant-vnode-05 = {
description = "Vagrant vnode-05 service";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${vagrantScript}/bin/vagrant-vnode-05";
User = "user";
WorkingDirectory = "/home/user/kubernetes-cluster/vnodes";
Environment = "PATH=${pkgs.lib.makeBinPath (with pkgs; [ vagrant curl openssh virtualbox ])}:$PATH";
};
wantedBy = [ "multi-user.target" ];
};
}