lib | ||
.dockerignore | ||
.editorconfig | ||
.gitignore | ||
cache.go | ||
config.go | ||
docker-compose.yml | ||
Dockerfile | ||
example.yml | ||
flake.lock | ||
flake.nix | ||
go.mod | ||
go.sum | ||
helpers.go | ||
icon.svg | ||
LICENSE.md | ||
main.go | ||
preview.png | ||
README.md | ||
status.go | ||
TODO.md |
dashh
yet another dashboard for organizing your links.
- easy to configure (1 yaml file required, see example)
- incredibly light frontend (no javascript, just plain html+css)
- uses css3's flexbox "masonry" layout
- mobile friendly
- server written in go
installing
from source
- make sure you have go 1.16 or newer
- clone this repo and
cd
into it in a terminal go mod download && go build
./dashh -p 8080 /path/to/your/dashboard.yml
(seedashh -h
for all options)
systemd
- compile/download and move the binary to
/usr/local/bin/dashh
- put your configuration in
/etc/dashh.yml
- (optional) make a dir called
/var/lib/dashh/
to store your static assets - create a user and group called
dashh
and make sure it owns and/or has the right permissions for the paths you created - put the following in
/etc/systemd/system/dashh.service
:
[Unit]
Description=dashhboardd
After=network.target
[Service]
ExecStart=/usr/local/bin/dashh -s /var/lib/dashh/ /etc/dashh.yml
User=dashh
Group=dashh
Type=exec
Restart=always
[Install]
WantedBy=default.target
RequiredBy=network.target
sudo systemctl daemon-reload && sudo systemctl enable --now dashh
Docker
to do...
NixOS (flake)
add this to flake.nix
:
{
inputs = {
dashh.url = "git+https://git.cyberia.club/reese/dashh";
};
outputs = { self, ... }@inputs: with inputs; rec {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem rec {
specialArgs = { inherit inputs self; };
system = "x86_64-linux";
modules = [
./configuration.nix
dashh.nixosModules.dashh
];
};
};
};
}
example configuration.nix
{
services.dashh = {
enable = true;
theme = {
light = "#f0d8e6";
dark = "#290d34";
accent = "#e15aa8";
};
css = ''
.subtitle {
font-style: oblique;
}
'';
sections = {
Admin = {
apps = {
Router = {
subtitle = "pfSense";
href = "https://192.168.0.1";
icon = "pfsense.png";
status = {
enable = true;
type = "ping";
url = "192.168.0.1";
};
};
"Wifi APs" = {
icon = "openwrt.png";
nodes = [
{ name = "Downstairs";
href = "http://192.168.0.2"; }
{ name = "Upstairs";
href = "http://192.168.0.3"; }
];
};
};
};
};
};
}
see flake.nix for all options.
be aware that your entries will be sorted alphabetically. this is something Nix does and I don't think there's an easy way to override it.
command-line usage
--cache-age float How long to cache icons for (in hours) (default 12)
-c, --cache-dir string Directory for storing cached icons
-p, --port int HTTP server port (default 8327)
-s, --static string Path to your static files
<config> Your dashboard configuration file (Required)
configuration
theme: <keywords mapped to hexadecimal color codes>
light: "#fff" # background in light mode
dark: "#000" # foreground in light mode
accent: "#0cf" # entry highlight
statusUnknown: "#888" # status pending color
statusGood: "#0f0" # status good (up) color
statusBad: "#f00" # status bad (down) color
autoTheme: <bool> (default=true) # switch foreground and background colors when client's prefers-color-scheme is dark
columnSize: <CSS length> (default=400px) # maximum width of each column
radius: <CSS length> (default=1.5em) # border radius
css: <string> # extra styles to add to the built-in template's
statusInt: <time.ParseDuration-compatible string>
entries:
- title: <string> # category heading
apps:
- name: <string>
href: <string>
icon: <string> # see the "icons" section
status: # see the "status indicators" section
enable: <boolean> (default=false)
type: <string> (default=http)
url: <string>
path: <string>
nodes: # nesting of nodes isn't supported by the default template
- name: <string>
href: <URL>
status: ...
bookmarks:
- name: <string>
href: <string>
icon: <string>
status: ...
icons
an entry's icon:
can be one of a number of different types of strings. dashh will try to resolve it in this order:
- if it's a single character (like an emoji), that will be the icon.
- if it starts with
/
, then it will resolve to one of your static files. - if it starts with
data:
, then it will assume a URL-encoded image. - if it starts with
http
, then it will use that URL as the icon. - if it starts with
mdi-
, then it will use an icon provided by material-design-icons. - if it ends with
.png
, then it will use an icon provided by dashboard-icons.
status indicators
apps, nodes, and bookmarks can show their status with a colored dot next to them. green means the host is up, red means down, and grey means dashh hasn't finished checking that entry's status yet. status is checked server-side and you will only see updates upon refreshing the page in your browser.
http
mode, the default when type
is unspecified, tries to visit the URL like a web page in the browser. it will be considered "down" if any server-side (5xx) or transport errors occur.
json
mode will fetch the URL, and assuming it's a valid JSON object will index it using the value of path
(see GJSON's documentation for syntax). the value must be a boolean.
ping
mode will send a single ICMP echo (ping) packet to the host. url
must be a FQDN or IP address without anything extra like protocol, port, or path.
if url
is empty, the entry's href
will be used instead.