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