diff --git a/examples/launchCageOnBoot.nix b/examples/launchCageOnBoot.nix new file mode 100644 index 0000000..78c9d66 --- /dev/null +++ b/examples/launchCageOnBoot.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: +let + welcomeMessage = "visionfive-nix"; + xtermWelcomeScript = pkgs.writeScript "xterm-visionfive-welcome.sh" '' + ${pkgs.figlet}/bin/figlet -c ${welcomeMessage} + ${pkgs.neofetch}/bin/neofetch + sh + ''; +in +{ + hardware.opengl.enable = true; + services.cage = { + enable = true; + user = "default"; + program = "${pkgs.xterm}/bin/xterm -fa 'Monospace' -fs 14 -bg black -fg white -e sh -c '${xtermWelcomeScript}'"; + }; +} diff --git a/examples/launchSwayOnBoot.nix b/examples/launchSwayOnBoot.nix new file mode 100644 index 0000000..98eb403 --- /dev/null +++ b/examples/launchSwayOnBoot.nix @@ -0,0 +1,10 @@ +{ + programs = { + sway.enable = true; + bash.loginShellInit = '' + if [[ "$(tty)" == /dev/tty1 ]]; then + exec sway &> /dev/null + fi + ''; + }; +} diff --git a/examples/mosquitto.nix b/examples/mosquitto.nix new file mode 100644 index 0000000..ef7c63d --- /dev/null +++ b/examples/mosquitto.nix @@ -0,0 +1,18 @@ +{ + networking.firewall.allowedTCPPorts = [ 1883 ]; + services.mosquitto = { + enable = true; + settings.max_keepalive = 300; + listeners = [ + { + port = 1883; + omitPasswordAuth = true; + users = {}; + settings = { + allow_anonymous = true; + }; + acl = [ "topic readwrite #" ]; + } + ]; + }; +}