From 21de12cd6e63adf463674942f1a8f9b658f47945 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Thu, 9 Apr 2026 13:14:01 -0500 Subject: jta changes --- modules/desktop/hjem/programs/foot.nix | 2 +- modules/desktop/hjem/wm/sway.nix | 50 +++++++ modules/nix/nixos/default.nix | 5 +- modules/services/nixos/jta/assignments.html | 148 +++++++++++++++++++++ modules/services/nixos/jta/default.nix | 1 + modules/services/nixos/jta/index.html | 199 ++++++++++++++-------------- modules/services/nixos/jta/main.go | 31 +++++ modules/services/nixos/jta/style.css | 29 ++++ modules/user/nixos/default.nix | 18 +-- 9 files changed, 374 insertions(+), 109 deletions(-) create mode 100644 modules/services/nixos/jta/assignments.html (limited to 'modules') diff --git a/modules/desktop/hjem/programs/foot.nix b/modules/desktop/hjem/programs/foot.nix index 7fe88ab..d10db24 100644 --- a/modules/desktop/hjem/programs/foot.nix +++ b/modules/desktop/hjem/programs/foot.nix @@ -15,7 +15,7 @@ # key-bindings.spawn-terminal = "Control+Return"; - colors = with config.collinux.palette; { + colors-dark = with config.collinux.palette; { alpha = "0.6"; foreground = base05; diff --git a/modules/desktop/hjem/wm/sway.nix b/modules/desktop/hjem/wm/sway.nix index a0bfa4e..441670b 100644 --- a/modules/desktop/hjem/wm/sway.nix +++ b/modules/desktop/hjem/wm/sway.nix @@ -6,6 +6,54 @@ }: let cfg = config.collinux.desktop.wm.sway; + batteryNotify = pkgs.writeShellApplication { + name = "battery-notify"; + runtimeInputs = [ + pkgs.coreutils + pkgs.libnotify + ]; + text = '' + energy_now=$(cat /sys/class/power_supply/BAT0/energy_now) + energy_full=$(cat /sys/class/power_supply/BAT0/energy_full) + percentage=$((energy_now * 100 / energy_full)) + percent_display=$(printf "%.0f%%" "$percentage") + + notify-send \ + -t 2000 \ + -h int:value:"$percentage" \ + -h string:x-dunst-stack-tag:battery \ + "Battery" \ + "$percent_display" + ''; + }; + + powerMenu = pkgs.writeShellApplication { + name = "power-menu"; + runtimeInputs = [ + pkgs.fuzzel + pkgs.systemd + pkgs.sway + ]; + text = '' + selection=$(printf '%s\n' logout suspend reboot shutdown | fuzzel --dmenu --prompt "power: ") + + case "$selection" in + logout) + swaymsg exit + ;; + suspend) + systemctl suspend + ;; + reboot) + systemctl reboot + ;; + shutdown) + systemctl poweroff + ;; + esac + ''; + }; + settings = with config.collinux.palette; '' exec { ${config.collinux.desktop.wallpaper_cmd} @@ -59,7 +107,9 @@ Mod4+Return exec foot Mod4+Space exec fuzzel + Mod4+Escape exec '${powerMenu}/bin/power-menu' Mod4+b exec firefox + Mod4+k exec '${batteryNotify}/bin/battery-notify' Mod4+w exec '${pkgs.iwmenu}/bin/iwmenu -l fuzzel -i font -s 2' Mod4+e exec '${pkgs.bzmenu}/bin/bzmenu -l fuzzel -i font -s 2' diff --git a/modules/nix/nixos/default.nix b/modules/nix/nixos/default.nix index 7441236..f39f368 100644 --- a/modules/nix/nixos/default.nix +++ b/modules/nix/nixos/default.nix @@ -19,12 +19,11 @@ daemonIOSchedClass = "idle"; settings = { + flake-registry = "${inputs.flake-registry}/flake-registry.json"; + extra-experimental-features = ["nix-command" "flakes" "pipe-operators"]; auto-optimise-store = true; use-xdg-base-directories = true; - - # lazy-trees = true; - # eval-cores = 0; }; # Disable channels diff --git a/modules/services/nixos/jta/assignments.html b/modules/services/nixos/jta/assignments.html new file mode 100644 index 0000000..3031a29 --- /dev/null +++ b/modules/services/nixos/jta/assignments.html @@ -0,0 +1,148 @@ + + +
+ + +Public landing page. Login is required to view assignments and all other pages.
+ +