examples: init
This commit is contained in:
parent
d04dbc0feb
commit
c58d08725f
17
examples/launchCageOnBoot.nix
Normal file
17
examples/launchCageOnBoot.nix
Normal file
@ -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}'";
|
||||||
|
};
|
||||||
|
}
|
10
examples/launchSwayOnBoot.nix
Normal file
10
examples/launchSwayOnBoot.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
programs = {
|
||||||
|
sway.enable = true;
|
||||||
|
bash.loginShellInit = ''
|
||||||
|
if [[ "$(tty)" == /dev/tty1 ]]; then
|
||||||
|
exec sway &> /dev/null
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
18
examples/mosquitto.nix
Normal file
18
examples/mosquitto.nix
Normal file
@ -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 #" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user