stonehenge: update config
This commit is contained in:
parent
c36c1f618b
commit
3b6e80523f
5 changed files with 108 additions and 2 deletions
33
hosts/stonehenge/vagrant.nix
Normal file
33
hosts/stonehenge/vagrant.nix
Normal 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" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue