format
This commit is contained in:
51
flake.nix
51
flake.nix
@@ -15,9 +15,21 @@
|
|||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
participantNames = [ "hopper" "curie" ];
|
participantNames = [ "hopper" "curie" ];
|
||||||
fullParticipantNames = [
|
fullParticipantNames = [
|
||||||
"hopper" "curie" "lovelace" "noether" "hamilton"
|
"hopper"
|
||||||
"franklin" "johnson" "clarke" "goldberg" "liskov"
|
"curie"
|
||||||
"wing" "rosen" "shaw" "karp" "rich"
|
"lovelace"
|
||||||
|
"noether"
|
||||||
|
"hamilton"
|
||||||
|
"franklin"
|
||||||
|
"johnson"
|
||||||
|
"clarke"
|
||||||
|
"goldberg"
|
||||||
|
"liskov"
|
||||||
|
"wing"
|
||||||
|
"rosen"
|
||||||
|
"shaw"
|
||||||
|
"karp"
|
||||||
|
"rich"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -50,7 +62,12 @@
|
|||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
openssh curl git networkmanager firefox xterm
|
openssh
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
networkmanager
|
||||||
|
firefox
|
||||||
|
xterm
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
@@ -196,7 +213,13 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
firefox curl git jq nano tree nixos-container
|
firefox
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
jq
|
||||||
|
nano
|
||||||
|
tree
|
||||||
|
nixos-container
|
||||||
(pkgs.writeScriptBin "connect" ''
|
(pkgs.writeScriptBin "connect" ''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
@@ -221,16 +244,18 @@
|
|||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
nat = {
|
nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = ["ve-+"];
|
internalInterfaces = [ "ve-+" ];
|
||||||
externalInterface = "eth0";
|
externalInterface = "eth0";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
containers = builtins.listToAttrs (builtins.genList (i:
|
containers = builtins.listToAttrs (builtins.genList
|
||||||
|
(i:
|
||||||
let
|
let
|
||||||
name = builtins.elemAt participantNames i;
|
name = builtins.elemAt participantNames i;
|
||||||
ip = "192.168.100.${toString (11 + i)}";
|
ip = "192.168.100.${toString (11 + i)}";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
inherit name;
|
inherit name;
|
||||||
value = {
|
value = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
@@ -266,7 +291,12 @@
|
|||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
docker curl git wget jq bash
|
docker
|
||||||
|
curl
|
||||||
|
git
|
||||||
|
wget
|
||||||
|
jq
|
||||||
|
bash
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.workshop-setup = {
|
systemd.services.workshop-setup = {
|
||||||
@@ -325,7 +355,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) (builtins.length participantNames));
|
)
|
||||||
|
(builtins.length participantNames));
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user