{ config, pkgs, lib, ... }: let # a custom qlcplus desktop file to launch in kiosk mode with the correct workspace qlcplus_launcher_entry = pkgs.writeText "qlcplus.desktop" '' [Desktop Entry] Type=Application Name=Q Light Controller Plus GenericName=Lighting control Keywords=qlc;light;controller;dmx;analog;midi;artnet;e131;osc; Exec=${pkgs.qlcplus}/bin/qlcplus --kiosk --open /persist/qlc/stube.qxw Icon=qlcplus MimeType=application/x-qlc-workspace; Categories=Qt;AudioVideo; X-XFCE-Source=${pkgs.qlcplus}/share/applications/qlcplus.desktop ''; # a script to start qlcplus as admin in current session edit-qlc-workspace = pkgs.writeScriptBin "edit_qlc_workspace.sh" '' su -c "${pkgs.qlcplus}/bin/qlcplus --open /persist/qlc/stube.qxw" - admin ''; # custom menu(top-left) to remove unnecessary entries custom-menu-file = pkgs.writeText "custom.menu" ''
''; in { home.persistence."/persist/home/stube" = { files = [ # xfconf.settings needs an existing installation (not all values are specified below) ".config/xfce4/xfconf/xfce-perchannel-xml" ]; directories = [ # keep mixxx song database between reboots ".mixxx" "Music" "Videos" ]; allowOther = false; }; # restart xfce4 panels on configuration change (ignore errors) home.activation.restart-xfce4-panel = lib.hm.dag.entryAfter ["writeBoundary"] '' run /bin/sh -c "${pkgs.xfce.xfce4-panel}/bin/xfce4-panel -r || true" ''; # configure xfce4 desktop environment xfconf.settings = { xfwm4 = { "general/workspace_count" = 1; }; xfce4-power-manager = { "xfce4-power-manager/presentation-mode" = true; "xfce4-power-manager/lock-screen-suspend-hibernate" = false; }; xfce4-notifyd."do-not-disturb" = true; xfce4-panel = { "plugins/plugin-100" = "applicationsmenu"; "plugins/plugin-100/custom-menu" = true; "plugins/plugin-100/custom-menu-file" = "${custom-menu-file}"; "plugins/plugin-100/button-icon" = "org.xfce.panel.actions"; "plugins/plugin-100/button-title" = "Anwendungen"; "plugins/plugin-110" = "separator"; "plugins/plugin-110/style" = 0; "plugins/plugin-101" = "tasklist"; "plugins/plugin-101/grouping" = "1"; "plugins/plugin-101/show-handle" = false; "plugins/plugin-102" = "separator"; "plugins/plugin-102/expand" = true; "plugins/plugin-102/style" = 0; "plugins/plugin-103" = "systray"; "plugins/plugin-103/square-icons" = true; "plugins/plugin-104" = "separator"; "plugins/plugin-104/style" = 0; "plugins/plugin-105" = "pulseaudio"; "plugins/plugin-105/enable-keyboard-shortcuts" = true; "plugins/plugin-106" = "separator"; "plugins/plugin-106/style" = 0; "plugins/plugin-107" = "clock"; "plugins/plugin-107/digital-date-format" = "%d %b %Y"; "plugins/plugin-108" = "separator"; "plugins/plugin-108/style" = 0; /* "plugins/plugin-109" = "actions"; "plugins/plugin-109/items" = [ "-lock-screen" "-switch-user" "-separator" "-suspend" "-hibernate" "-hybrid-sleep" "-separator" "+shutdown" "-restart" "-separator" "-logout" "-logout-dialog" ]; */ "panels/panel-1/plugin-ids" = [ 100 110 101 102 103 104 105 106 107 108 ]; "plugins/plugin-200" = "showdesktop"; "plugins/plugin-201" = "launcher"; "plugins/plugin-201/items" = ["${pkgs.xfce.xfce4-settings}/share/applications/xfce4-file-manager.desktop"]; "plugins/plugin-210" = "separator"; "plugins/plugin-210/style" = 0; "plugins/plugin-211" = "launcher"; "plugins/plugin-211/items" = ["${pkgs.firefox}/share/applications/firefox.desktop"]; "plugins/plugin-212" = "launcher"; "plugins/plugin-212/items" = ["${pkgs.spotify}/share/applications/spotify.desktop"]; "plugins/plugin-213" = "launcher"; "plugins/plugin-213/items" = ["${pkgs.mixxx}/share/applications/org.mixxx.Mixxx.desktop"]; "plugins/plugin-220" = "separator"; "plugins/plugin-220/style" = 0; "plugins/plugin-221" = "launcher"; "plugins/plugin-221/items" = [ "${qlcplus_launcher_entry}" ]; "panels/panel-2/plugin-ids" = [ 200 201 210 211 212 213 220 221 ]; }; xfce4-desktop = { # right monitor (no background image to save displaylink bandwidth) "backdrop/screen0/monitorDP-1/workspace0/image-style" = 0; "backdrop/screen0/monitorDP-1/workspace0/color-style" = 0; "backdrop/screen0/monitorDP-1/workspace0/rgba1" = [0.369 0.361 0.392 1]; # left monitor "backdrop/screen0/monitorVGA-1/workspace0/image-style" = 5; "backdrop/screen0/monitorVGA-1/workspace0/last-image" = "${./background.jpg}"; # beamer "backdrop/screen0/monitorHDMI-1/workspace0/image-style" = 5; "backdrop/screen0/monitorHDMI-1/workspace0/last-image" = "${./background.jpg}"; # virtual machine screen "backdrop/screen0/monitorVirtual-1/workspace0/image-style" = 5; "backdrop/screen0/monitorVirtual-1/workspace0/last-image" = "${./background.jpg}"; "desktop-icons/file-icons/show-home" = false; "desktop-icons/file-icons/show-filesystem" = false; "desktop-icons/file-icons/show-trash" = false; }; }; # desktop file for shutdown entry in menu xdg.desktopEntries.shutdown = { name = "Herunterfahren"; terminal = false; icon = "xfsm-shutdown"; exec = "shutdown -h now"; }; # desktop file for reboot entry in menu xdg.desktopEntries.restart = { name = "Neustarten"; terminal = false; icon = "xfsm-reboot"; exec = "reboot"; }; home.packages = with pkgs; [ qlcplus # dmx controller spotify # audio player mixxx # more professional audio player vlc # media player mpv # media player libreoffice-still # office edit-qlc-workspace # script defined earlier ]; # firefox without google, ads and anything unnecessary programs.firefox = { enable = true; profiles.default = { settings = { "browser.startup.homepage" = "https://duckduckgo.com"; "general.useragent.locale" = "de-DE"; }; search = { default = "DuckDuckGo"; force = true; }; }; policies = { DisableTelemetry = true; DisableFirefoxStudies = true; EnableTrackingProtection = { Value = true; Locked = true; Cryptomining = true; Fingerprinting = true; }; DisablePocket = true; DisableFirefoxAccounts = true; DisableAccounts = true; DisableFirefoxScreenshots = true; OverrideFirstRunPage = ""; OverridePostUpdatePage = ""; DontCheckDefaultBrowser = true; DisplayBookmarksToolbar = "never"; DisplayMenuBar = "default-off"; SearchBar = "unified"; ExtensionSettings = { "*".installation_mode = "blocked"; "uBlock0@raymondhill.net" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; installation_mode = "force_installed"; }; }; }; }; home.stateVersion = "24.05"; }