A simple, maybe not so simple clock replacement for the office of ACM@UIC.
- Time and Date
- CTA Bus and Train Arrival Times
- Weather from DarkSky
This project is built and deployed with the Nix package manager. The NPM application can be built as follows:
nix build .#
This will produce a symlink called "result" in your local directory. The program can be run as follows:
./result/bin/simple-ts-clock
- Clone the repository.
- Navigate to the repository directory.
- Create a
.env
file based on.env.example
. - Run
npm install
to install dependencies.
- Run
npm run start
to start the npm server ornpm run watch
to watch for changes. - Navigate the browser to
locahost:8080
or the port specified in the.env
config.
Offline mode will disable api requests to the server leaving only the clock running. It can be activated by going to /offline
path.
Demo mode works like offline mode but displays demo information instead of real data from apis. It can be activated by going to /demo
path.
To override the default config, you can use the URL GET parameters or by pressing c
to open the config options.
To deploy to ACM's clock machine, simply run
./deploy
This repo is set to poll and auto upgrade the ACM clock machine every day automatically from the contents of this repo.
To deploy outside ACM, first use agenix to
encrypt an env file containing the secrets (based on .env.example) replace the
current enc.env
file. You can encrypt your file to the SSH host key of the
target machine. The enc.env
file in the repo will decrypt on ACM's clock
machine.
Then, edit the system configuration at nix/system.nix
to your liking and
deploy:
nixos-rebuild switch --flake .#acmclock --build-host root@yourmachine --target-host root@yourmachine
Make sure to change system.autoUpgrade
to point to your repo, or disable it.
This project was originally a rewrite of sudoclock by clee231.
The project has since been rewritten mostly in the simple-js-clock repo by bmiddha and other contributors.
In January 2023, the simple-js-clock repo was forked to continue development here.
In February 2025, @SohamG and @clee231 updated the app to Node 20 and added the Nix-based build and deployment.