feat: add wifi hotspot configuration and refactor gui sections
This commit is contained in:
137
common.nix
137
common.nix
@@ -233,6 +233,27 @@ isoConfig
|
|||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dns = "none"; # We use dnsmasq
|
dns = "none"; # We use dnsmasq
|
||||||
|
ensureProfiles = {
|
||||||
|
environmentFiles = [ "/etc/NetworkManager/workshop-wifi.env" ];
|
||||||
|
profiles = {
|
||||||
|
"workshop-hotspot" = {
|
||||||
|
connection = {
|
||||||
|
id = "workshop-hotspot";
|
||||||
|
type = "wifi";
|
||||||
|
autoconnect = true;
|
||||||
|
autoconnect-priority = 10;
|
||||||
|
};
|
||||||
|
wifi = {
|
||||||
|
ssid = "$WORKSHOP_SSID";
|
||||||
|
mode = "infrastructure";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$WORKSHOP_PSK";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
hostName = if isLiveIso then "workshop-live" else "workshop-vm";
|
hostName = if isLiveIso then "workshop-live" else "workshop-vm";
|
||||||
hosts."127.0.0.1" = [
|
hosts."127.0.0.1" = [
|
||||||
@@ -243,6 +264,15 @@ isoConfig
|
|||||||
firewall.enable = false; # Workshop environment
|
firewall.enable = false; # Workshop environment
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# WiFi credentials file
|
||||||
|
environment.etc."NetworkManager/workshop-wifi.env" = {
|
||||||
|
text = ''
|
||||||
|
WORKSHOP_SSID="ziegel"
|
||||||
|
WORKSHOP_PSK="1234567890"
|
||||||
|
'';
|
||||||
|
mode = "0600";
|
||||||
|
};
|
||||||
|
|
||||||
# DNS Configuration - Wildcard *.workshop.local -> 127.0.0.1
|
# DNS Configuration - Wildcard *.workshop.local -> 127.0.0.1
|
||||||
services.dnsmasq = {
|
services.dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -1125,10 +1155,10 @@ isoConfig
|
|||||||
echo "🧪 Tier 3 - Community: collabora croc dokuwiki ghost loomio..."
|
echo "🧪 Tier 3 - Community: collabora croc dokuwiki ghost loomio..."
|
||||||
echo "🌐 Extended: matrix-synapse rocketchat gitlab n8n mastodon..."
|
echo "🌐 Extended: matrix-synapse rocketchat gitlab n8n mastodon..."
|
||||||
echo ""
|
echo ""
|
||||||
echo "🚀 Usage:"
|
echo "🚀 Usage:"
|
||||||
echo " deploy <recipe> - Deploy locally"
|
echo " deploy <recipe> - Deploy locally"
|
||||||
echo " browser [firefox|chromium] [recipe] - Open in browser"
|
echo " browser [recipe] - Open in browser"
|
||||||
echo " 📖 Full catalog: https://recipes.coopcloud.tech"
|
echo " 📖 Full catalog: https://recipes.coopcloud.tech"
|
||||||
echo ""
|
echo ""
|
||||||
echo "💡 Tab completion: deploy <TAB> or browser <TAB>"
|
echo "💡 Tab completion: deploy <TAB> or browser <TAB>"
|
||||||
}
|
}
|
||||||
@@ -1156,7 +1186,7 @@ isoConfig
|
|||||||
echo " setup - Setup local proxy (REQUIRED FIRST!)"
|
echo " setup - Setup local proxy (REQUIRED FIRST!)"
|
||||||
echo " recipes - Show all available apps"
|
echo " recipes - Show all available apps"
|
||||||
echo " deploy <recipe> - Deploy app locally"
|
echo " deploy <recipe> - Deploy app locally"
|
||||||
echo " browser [firefox|chromium] [recipe] - Launch browser [to app]"
|
echo " browser [recipe] - Launch browser [to app]"
|
||||||
echo " desktop - Start GUI session"
|
echo " desktop - Start GUI session"
|
||||||
echo " sudo abra - Run abra CLI directly as root"
|
echo " sudo abra - Run abra CLI directly as root"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -1185,58 +1215,51 @@ isoConfig
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.chromium = {
|
|
||||||
enable = true;
|
|
||||||
extensions = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Font packages for GUI rendering (QEMU GTK display)
|
# Font packages for GUI rendering (QEMU GTK display)
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
dejavu_fonts # DejaVu fonts including Sans Mono
|
dejavu_fonts # DejaVu fonts including Sans Mono
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
noto-fonts
|
noto-fonts
|
||||||
cantarell-fonts # GNOME default font
|
cantarell-fonts # GNOME default font
|
||||||
ubuntu-classic # Additional font for compatibility
|
ubuntu-classic # Additional font for compatibility
|
||||||
freefont_ttf # Additional fonts
|
freefont_ttf # Additional fonts
|
||||||
fontconfig # Enhanced font configuration for QEMU
|
fontconfig # Enhanced font configuration for QEMU
|
||||||
];
|
];
|
||||||
|
|
||||||
# GUI Configuration
|
# GUI Configuration
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
desktopManager.gnome.enable = true;
|
desktopManager.gnome.enable = true;
|
||||||
displayManager.gdm.enable = true;
|
displayManager.gdm.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Exclude unnecessary GNOME packages
|
||||||
|
environment.gnome.excludePackages = with pkgs; [
|
||||||
|
gnome-photos
|
||||||
|
gnome-tour
|
||||||
|
gnome-music
|
||||||
|
gnome-maps
|
||||||
|
cheese
|
||||||
|
epiphany
|
||||||
|
geary
|
||||||
|
evince
|
||||||
|
totem
|
||||||
|
simple-scan
|
||||||
|
yelp
|
||||||
|
gnome-contacts
|
||||||
|
gnome-weather
|
||||||
|
gnome-clocks
|
||||||
|
gnome-terminal
|
||||||
|
];
|
||||||
|
|
||||||
|
# Auto-start console and set GNOME settings
|
||||||
# Exclude unnecessary GNOME packages
|
environment.etc."xdg/autostart/gnome-console.desktop".text = ''
|
||||||
environment.gnome.excludePackages = with pkgs; [
|
[Desktop Entry]
|
||||||
gnome-photos
|
Type=Application
|
||||||
gnome-tour
|
Name=Workshop Console
|
||||||
gnome-music
|
Exec=sh -c "gsettings set org.gnome.shell favorite-apps \"['org.gnome.TextEditor.desktop', 'org.gnome.Console.desktop', 'firefox.desktop']\" && gsettings set org.gnome.shell welcome-dialog-last-shown-version \"999999\" && gnome-console --maximize --hide-menubar --title=\"Workshop Console\""
|
||||||
gnome-maps
|
NoDisplay=false
|
||||||
cheese
|
'';
|
||||||
epiphany
|
|
||||||
geary
|
|
||||||
evince
|
|
||||||
totem
|
|
||||||
simple-scan
|
|
||||||
yelp
|
|
||||||
gnome-contacts
|
|
||||||
gnome-weather
|
|
||||||
gnome-clocks
|
|
||||||
gnome-terminal
|
|
||||||
];
|
|
||||||
|
|
||||||
# Auto-start console and set GNOME settings
|
|
||||||
environment.etc."xdg/autostart/gnome-console.desktop".text = ''
|
|
||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Workshop Console
|
|
||||||
Exec=sh -c "gsettings set org.gnome.shell favorite-apps \"['org.gnome.TextEditor.desktop', 'org.gnome.Console.desktop', 'firefox.desktop']\" && gsettings set org.gnome.shell welcome-dialog-last-shown-version \"999999\" && gnome-console --maximize --hide-menubar --title=\"Workshop Console\""
|
|
||||||
NoDisplay=false
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Auto-login configuration (renamed in newer NixOS)
|
# Auto-login configuration (renamed in newer NixOS)
|
||||||
services.displayManager.autoLogin = {
|
services.displayManager.autoLogin = {
|
||||||
@@ -1244,12 +1267,12 @@ isoConfig
|
|||||||
user = "workshop";
|
user = "workshop";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure GNOME favorite apps and disable welcome dialog
|
# Configure GNOME favorite apps and disable welcome dialog
|
||||||
services.xserver.desktopManager.gnome = {
|
services.xserver.desktopManager.gnome = {
|
||||||
extraGSettingsOverrides = ''
|
extraGSettingsOverrides = ''
|
||||||
[org.gnome.shell]
|
[org.gnome.shell]
|
||||||
favorite-apps=['org.gnome.TextEditor.desktop', 'org.gnome.Console.desktop', 'firefox.desktop']
|
favorite-apps=['org.gnome.TextEditor.desktop', 'org.gnome.Console.desktop', 'firefox.desktop']
|
||||||
welcome-dialog-last-shown-version='999999'
|
welcome-dialog-last-shown-version='999999'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user