Skip to content

Commit 93fc70f

Browse files
committed
chore: provide actual MOTD
1 parent 80ce6ca commit 93fc70f

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

packages/installer/motd.nix

+25-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
1-
{
2-
pkgs,
3-
config,
4-
lib,
5-
...
6-
}: {
1+
{pkgs, ...}: {
72
_file = ./motd.nix;
83

9-
users.motd = "This is a test message.";
4+
environment.etc."gui-motd".text = ''
5+
Welcome to NobbZ' <b>inofficial</b> NixOS live disk!
6+
7+
The tooling, configuration and drivers on this disk are mostly tailored to
8+
my own needs and might not work well for you.
9+
10+
Currently you are looking at an <tt>awesome wm</tt> session, the modkey is
11+
<tt>Mod4</tt> (the "windows" key).
12+
13+
<s>Most important tooling is available through the "awesome" menu, which is</s>
14+
<s>located in the upper left corner of the screen.</s>
15+
16+
If you want to use the terminal, you can either use the menu, or press
17+
<tt>Mod4+Enter</tt>.
18+
19+
<s>Rofi is available as well, you can open it by pressing <tt>Mod4+d</tt>.</s>
20+
21+
A more complete list of keybindings can be found in the awesome help screen
22+
by pressing <tt>Mod4+s</tt>.
23+
'';
1024

1125
systemd.user.services.motd = {
1226
description = "Prints a test message";
1327
wantedBy = ["graphical-session.target"];
28+
script = ''
29+
motd=$(cat /etc/gui-motd)
30+
${pkgs.gnome.zenity}/bin/zenity --info --text="$motd" --no-wrap --title="Short usage notes"
31+
'';
1432
serviceConfig = {
1533
Type = "simple";
16-
ExecStart = "${lib.getExe pkgs.gnome.zenity} --info --text='${config.users.motd}'";
1734
Restart = "on-failure";
1835
};
1936
};

0 commit comments

Comments
 (0)