feat: Enhance NixOS workshop environment with conditional ISO settings and improved local development commands

This commit is contained in:
2025-08-16 14:42:52 +02:00
parent 66c986c8f1
commit 6c32b42f48
3 changed files with 155 additions and 125 deletions

25
ABRA_RECIPES.md Normal file
View File

@@ -0,0 +1,25 @@
| Recipe | Score | Description | Link |
|---|---|---|---|
| gitea | 5 | Self-hosted Git service | [https://recipes.coopcloud.tech/gitea](https://recipes.coopcloud.tech/gitea) |
| mealie | 5 | Recipe manager and meal planner | [https://recipes.coopcloud.tech/mealie](https://recipes.coopcloud.tech/mealie) |
| nextcloud | 5 | A safe home for all your data | [https://recipes.coopcloud.tech/nextcloud](https://recipes.coopcloud.tech/nextcloud) |
| gotosocial | 4 | Fast and friendly Fediverse server | [https://recipes.coopcloud.tech/gotosocial](https://recipes.coopcloud.tech/gotosocial) |
| wordpress | 4 | Create a beautiful website, blog, or app | [https://recipes.coopcloud.tech/wordpress](https://recipes.coopcloud.tech/wordpress) |
| collabora | 3 | Online Office suite | [https://recipes.coopcloud.tech/collabora](https://recipes.coopcloud.tech/collabora) |
| croc | 3 | Easily and securely send things | [https://recipes.coopcloud.tech/croc](https://recipes.coopcloud.tech/croc) |
| custom-php | 3 | Custom PHP application | [https://recipes.coopcloud.tech/custom-php](https://recipes.coopcloud.tech/custom-php) |
| dokuwiki | 3 | A simple to use and highly versatile Open Source wiki software | [https://recipes.coopcloud.tech/dokuwiki](https://recipes.coopcloud.tech/dokuwiki) |
| engelsystem | 3 | Tool for coordinating helpers and shifts | [https://recipes.coopcloud.tech/engelsystem](https://recipes.coopcloud.tech/engelsystem) |
| fab-manager | 3 | FabLab management software | [https://recipes.coopcloud.tech/fab-manager](https://recipes.coopcloud.tech/fab-manager) |
| ghost | 3 | Publishing platform for professional publishers | [https://recipes.coopcloud.tech/ghost](https://recipes.coopcloud.tech/ghost) |
| karrot | 3 | Web application for grassroots initiatives | [https://recipes.coopcloud.tech/karrot](https://recipes.coopcloud.tech/karrot) |
| lauti | 3 | Calendar software for events | [https://recipes.coopcloud.tech/lauti](https://recipes.coopcloud.tech/lauti) |
| loomio | 3 | Collaborative decision-making tool | [https://recipes.coopcloud.tech/loomio](https://recipes.coopcloud.tech/loomio) |
| mattermost | 3 | Secure collaboration platform | [https://recipes.coopcloud.tech/mattermost](https://recipes.coopcloud.tech/mattermost) |
| mattermost-lts | 3 | Long-term support for Mattermost | [https://recipes.coopcloud.tech/mattermost-lts](https://recipes.coopcloud.tech/mattermost-lts) |
| mrbs | 3 | Meeting Room Booking System | [https://recipes.coopcloud.tech/mrbs](https://recipes.coopcloud.tech/mrbs) |
| onlyoffice | 3 | Office suite for documents | [https://recipes.coopcloud.tech/onlyoffice](https://recipes.coopcloud.tech/onlyoffice) |
| open-inventory | 3 | Open source inventory management | [https://recipes.coopcloud.tech/open-inventory](https://recipes.coopcloud.tech/open-inventory) |
| outline | 3 | Team knowledge base | [https://recipes.coopcloud.tech/outline](https://recipes.coopcloud.tech/outline) |
| owncast | 3 | Self-hosted live video streaming | [https://recipes.coopcloud.tech/owncast](https://recipes.coopcloud.tech/owncast) |
| rallly | 3 | Schedule group meetings | [https://recipes.coopcloud.tech/rallly](https://recipes.coopcloud.tech/rallly) |

View File

@@ -1,8 +1,11 @@
{ pkgs, allParticipantNames, ... }: { { pkgs, allParticipantNames, ... }: {
system.stateVersion = "25.05"; system.stateVersion = "25.05";
# Conditional ISO image settings
${pkgs.lib.mkIf isLiveIso {
isoImage.makeEfiBootable = true; isoImage.makeEfiBootable = true;
isoImage.makeUsbBootable = true; isoImage.makeUsbBootable = true;
}}
networking.wireless.enable = true; networking.wireless.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@@ -83,6 +86,7 @@
echo "🏠 Local Development:" echo "🏠 Local Development:"
echo " recipes - Show available app recipes" echo " recipes - Show available app recipes"
echo " deploy <recipe> - Deploy app locally (e.g., deploy wordpress)" echo " deploy <recipe> - Deploy app locally (e.g., deploy wordpress)"
echo " setup-traefik - Setup local Traefik (required first!)"
echo " browser - Launch Firefox" echo " browser - Launch Firefox"
echo " desktop - Start GUI session" echo " desktop - Start GUI session"
echo "" echo ""
@@ -90,10 +94,10 @@
echo " Available servers:" echo " Available servers:"
${builtins.concatStringsSep "\n" (map (name: ${builtins.concatStringsSep "\n" (map (name:
"echo \" - ${name}.codecrispi.es\"" "echo \" - ${name}.codecrispi.es\""
) allParticipantNames)} ) cloudServerNames)}
echo " connect <name> - SSH to cloud server" echo " connect <name> - SSH to cloud server"
echo "" echo ""
echo "📚 Commands: recipes | deploy | connect | browser | desktop | help" echo "📚 Commands: setup-traefik | recipes | deploy | connect | browser | desktop | help"
# Ensure abra is in PATH # Ensure abra is in PATH
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
@@ -186,6 +190,7 @@
echo "CODE CRISPIES Workshop Commands:" echo "CODE CRISPIES Workshop Commands:"
echo "" echo ""
echo "🏠 Local Development:" echo "🏠 Local Development:"
echo " setup-traefik - Setup local Traefik proxy (required first!)"
echo " recipes - Show all available app recipes" echo " recipes - Show all available app recipes"
echo " deploy <recipe> - Deploy app locally (e.g., deploy wordpress)" echo " deploy <recipe> - Deploy app locally (e.g., deploy wordpress)"
echo " browser - Launch Firefox browser" echo " browser - Launch Firefox browser"
@@ -194,18 +199,15 @@
echo " Cloud Access:" echo " Cloud Access:"
echo " connect <name> - SSH to cloud server (e.g., connect hopper)" echo " connect <name> - SSH to cloud server (e.g., connect hopper)"
echo "" echo ""
echo "🔧 System:" echo "Available servers: ${builtins.concatStringsSep " " cloudServerNames}"
echo " sudo nmcli dev wifi connect SSID password PASSWORD"
echo " sudo systemctl restart workshop-abra-setup # Reinstall abra"
echo "" echo ""
echo "📚 Learning Flow:" echo "📚 Learning Flow:"
echo " 1. Try local: recipes deploy wordpress browser" echo " 1. First time: setup-traefik"
echo " 2. Try cloud: connect hopper same abra commands" echo " 2. Try local: recipes deploy wordpress browser"
echo "" echo " 3. Try cloud: connect hopper same abra commands"
echo "Available servers: ${builtins.concatStringsSep " " allParticipantNames}"
} }
export -f deploy connect recipes browser desktop help export -f setup-traefik deploy connect recipes browser desktop help
''; '';
}; };

View File

@@ -49,9 +49,9 @@
numParticipants; numParticipants;
# Common configuration for both live-iso and local-vm # Common configuration for both live-iso and local-vm
commonConfig = import ./common.nix { commonConfig =
inherit pkgs allParticipantNames participantNames; { isLiveIso ? false, ... } @ args:
}; import ./common.nix (args // { inherit pkgs allParticipantNames participantNames; });
in in
{ {
packages.${system} = { packages.${system} = {
@@ -63,6 +63,7 @@
modules = [ modules = [
commonConfig commonConfig
{ isLiveIso = true; }
]; ];
}; };
}; };
@@ -79,6 +80,7 @@
inherit system; inherit system;
modules = [ modules = [
commonConfig commonConfig
{ isLiveIso = false; }
({ config, pkgs, ... }: { ({ config, pkgs, ... }: {
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true; boot.loader.generic-extlinux-compatible.enable = true;
@@ -108,3 +110,4 @@
}; };
}; };
} }