summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix6
-rw-r--r--home/desktop/athena.nix16
-rw-r--r--home/desktop/default.nix1
-rw-r--r--home/environ/path.nix2
-rw-r--r--pkgs/athena-bccr/0001-Remove-CheckUpdatePlugin-from-default-list.patch25
-rw-r--r--pkgs/athena-bccr/LaunchGaudi.java12
-rw-r--r--pkgs/athena-bccr/default.nix30
-rw-r--r--pkgs/athena-bccr/firmador.nix57
-rw-r--r--pkgs/athena-bccr/gaudi-env.nix62
-rw-r--r--pkgs/athena-bccr/releases.nix12
-rw-r--r--pkgs/athena-bccr/unwrapped.nix226
-rw-r--r--pkgs/default.nix1
-rw-r--r--sys/hardware/athena.nix48
-rw-r--r--sys/hardware/default.nix1
-rw-r--r--trivionomicon/modules/waybar/default.nix13
-rw-r--r--trivionomicon/modules/waybar/hm.nix207
-rw-r--r--trivionomicon/modules/waybar/options.nix23
-rw-r--r--trivionomicon/pkgs/athena-bccr/firmador.nix2
18 files changed, 266 insertions, 478 deletions
diff --git a/flake.nix b/flake.nix
index 35dd05b..dd3239d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,7 +8,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
- nur.url = "github:nix-community/NUR";
+ nur = {
+ url = "github:nix-community/NUR";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
impermanence.url = "github:nix-community/impermanence";
hm-isolation.url = "github:3442/hm-isolation";
diff --git a/home/desktop/athena.nix b/home/desktop/athena.nix
new file mode 100644
index 0000000..6c1cbad
--- /dev/null
+++ b/home/desktop/athena.nix
@@ -0,0 +1,16 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib; let
+ cfg = config.local.desktop;
+in {
+ config = mkIf cfg.enable {
+ local.athena-bccr = {
+ enable = true;
+ gaudiHash = "sha256-EFVb3K/hQUD/u8/IftBAIYvSefwPqZDvcT8S9B860MM=";
+ };
+ };
+}
diff --git a/home/desktop/default.nix b/home/desktop/default.nix
index c7ef5a7..1224bcc 100644
--- a/home/desktop/default.nix
+++ b/home/desktop/default.nix
@@ -7,6 +7,7 @@
cfg = config.local.desktop;
in {
imports = [
+ ./athena.nix
./firefox.nix
./sway.nix
./waybar.nix
diff --git a/home/environ/path.nix b/home/environ/path.nix
index 9fc0a94..2feaf3e 100644
--- a/home/environ/path.nix
+++ b/home/environ/path.nix
@@ -14,11 +14,9 @@ in {
pkgs.calc
pkgs.cloc
pkgs.diceware
- pkgs.local.athena-bccr.latest.firmador
pkgs.gcc
pkgs.gnome-screenshot
(pkgs.gajim.overrideAttrs (super: {buildInputs = super.buildInputs ++ [pkgs.gsound];}))
- (pkgs.local.athena-bccr.latest.gaudi.override {gaudiHash = "sha256-0nuku63USr5rC0rIwUC6toDN46qu8/KkezDTsVz9uJo=";})
pkgs.gnucash
pkgs.gruvbox-dark-icons-gtk
pkgs.hack-font
diff --git a/pkgs/athena-bccr/0001-Remove-CheckUpdatePlugin-from-default-list.patch b/pkgs/athena-bccr/0001-Remove-CheckUpdatePlugin-from-default-list.patch
deleted file mode 100644
index e7fc5d5..0000000
--- a/pkgs/athena-bccr/0001-Remove-CheckUpdatePlugin-from-default-list.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 5e7eb46f46af6a29a2aea19db722ebc28baede25 Mon Sep 17 00:00:00 2001
-From: Alejandro Soto <alejandro@34project.org>
-Date: Sat, 21 Jun 2025 22:37:19 -0600
-Subject: [PATCH] Remove CheckUpdatePlugin from default list
-
----
- src/main/java/cr/libre/firmador/Settings.java | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/main/java/cr/libre/firmador/Settings.java b/src/main/java/cr/libre/firmador/Settings.java
-index e5ddf01..a028d6e 100644
---- a/src/main/java/cr/libre/firmador/Settings.java
-+++ b/src/main/java/cr/libre/firmador/Settings.java
-@@ -81,7 +81,7 @@ public class Settings {
-
- public Settings() {
- activePlugins.add("cr.libre.firmador.plugins.DummyPlugin");
-- activePlugins.add("cr.libre.firmador.plugins.CheckUpdatePlugin");
-+ // activePlugins.add("cr.libre.firmador.plugins.CheckUpdatePlugin");
- availablePlugins.add("cr.libre.firmador.plugins.DummyPlugin");
- availablePlugins.add("cr.libre.firmador.plugins.CheckUpdatePlugin");
- }
---
-2.49.0
-
diff --git a/pkgs/athena-bccr/LaunchGaudi.java b/pkgs/athena-bccr/LaunchGaudi.java
deleted file mode 100644
index e4bcdbf..0000000
--- a/pkgs/athena-bccr/LaunchGaudi.java
+++ /dev/null
@@ -1,12 +0,0 @@
-// Los del BCCR no se molestaron en ponerle un main al Agente Gaudi porque el
-// actualizador (que a su vez sí tiene main) carga el jar en memoria y crea una
-// instancia de Inicializador usando reflexión. El actualizador no es relevante
-// en Nix. En todo caso, dicho actualizador es sumamente frágil y me daría
-// demasiada pereza arreglarlo, así que en su lugar usamos este stub para
-// launchear Gaudi.
-
-public class LaunchGaudi {
- public static void main(String[] args) {
- new InicializadorCliente.Inicializador("");
- }
-}
diff --git a/pkgs/athena-bccr/default.nix b/pkgs/athena-bccr/default.nix
deleted file mode 100644
index a5f79ca..0000000
--- a/pkgs/athena-bccr/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- callPackage,
- lib,
-}: let
- latest = "deb64-rev26";
-
- releases = lib.mapAttrs (name: release: release // {name = name;}) (import ./releases.nix);
-
- overrideUnwrapped = default: new: let
- args = default // new;
- unwrappedPkgs = lib.filterAttrs (name: _: ! lib.elem name ["override" "overrideDerivation"]) (callPackage ./unwrapped.nix args);
- in
- lib.fix (unwrapped: lib.mapAttrs (_: pkg: callPackage pkg unwrapped) unwrappedPkgs)
- // {
- override = overrideUnwrapped args;
- };
-
- pkgsForRelease = release: let
- ase-pkcs11 = unwrapped.ase-idprotect.lib;
- libasep11 = "${ase-pkcs11}/lib/x64-athena/libASEP11.so";
- unwrapped = overrideUnwrapped {inherit release;} {};
- in {
- inherit ase-pkcs11 libasep11;
- inherit (unwrapped) ase-idprotect bccr-cacerts;
-
- gaudi = callPackage ./gaudi-env.nix {inherit unwrapped;};
- firmador = callPackage ./firmador.nix {inherit libasep11;};
- };
-in
- lib.mapAttrs (_: pkgsForRelease) (releases // {latest = releases.${latest};})
diff --git a/pkgs/athena-bccr/firmador.nix b/pkgs/athena-bccr/firmador.nix
deleted file mode 100644
index d280b56..0000000
--- a/pkgs/athena-bccr/firmador.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- fetchgit,
- lib,
- makeWrapper,
- maven,
- openjdk,
- wrapGAppsHook,
- libasep11 ? null,
-}: let
- jdk = openjdk.override {
- enableJavaFX = true;
- };
-
- version = "1.9.8";
-in
- maven.buildMavenPackage {
- pname = "firmador";
- inherit version;
-
- src = fetchgit {
- url = "https://codeberg.org/firmador/firmador";
- rev = version;
- hash = "sha256-xdiVPjihRADPK4nG+WQHWsDzVYLCeN6ouQ6SDtjf1qQ=";
- };
-
- patches = [
- ./0001-Remove-CheckUpdatePlugin-from-default-list.patch
- ];
-
- mvnHash = "sha256-h1zoStTgaE7toWWKq0Y0ahOORyltChwjmaMYjLgs1VE=";
-
- nativeBuildInputs = [
- makeWrapper
- wrapGAppsHook
- ];
-
- postPatch = lib.optionalString (libasep11 != null) ''
- sed -i 's@/usr/lib/x64-athena/libASEP11.so@${libasep11}@g' src/main/java/cr/libre/firmador/CRSigner.java
- '';
-
- installPhase = ''
- runHook preInstall
-
- mkdir -p $out/bin $out/share/java
- install -Dm644 target/firmador.jar $out/share/java
-
- makeWrapper ${jdk}/bin/java $out/bin/firmador \
- --add-flags "-jar $out/share/java/firmador.jar"
-
- runHook postInstall
- '';
-
- meta = {
- homepage = "https://firmador.libre.cr";
- license = lib.licenses.gpl3Plus;
- };
- }
diff --git a/pkgs/athena-bccr/gaudi-env.nix b/pkgs/athena-bccr/gaudi-env.nix
deleted file mode 100644
index 0ca1b82..0000000
--- a/pkgs/athena-bccr/gaudi-env.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- buildFHSEnv,
- curl,
- lib,
- writeShellScriptBin,
- gaudiHash ? null,
- unwrapped,
-}: let
- unwrappedWithGaudi = unwrapped.override {inherit gaudiHash;};
-in
- buildFHSEnv {
- name = "gaudi";
-
- targetPkgs = pkgs: [
- unwrappedWithGaudi.ase-idprotect.lib
- unwrappedWithGaudi.gaudi
-
- (writeShellScriptBin "launch-gaudi" ''
- set -o errexit
- set -o pipefail
- set -o nounset
-
- PATH="${lib.makeBinPath [curl]}:$PATH"
-
- echo "$0: testing for incompatible releases..." >&2
-
- jar_name=bccr-firma-fva-clienteMultiplataforma.jar
- url="https://www.firmadigital.go.cr/Bccr.Firma.Fva.Actualizador.ClienteFirmadorJava//recursosLiberica17/actualizador/$jar_name"
- ca_file="${unwrappedWithGaudi.bccr-cacerts}/root-ca.pem"
- url_hash=$(curl -sS --cacert "$ca_file" "$url" | sha256sum | cut -d' ' -f1)
- jar_path="${unwrappedWithGaudi.gaudi}/share/java/$jar_name"
- jar_hash=$(sha256sum "$jar_path" | cut -d' ' -f1)
-
- if [ "$url_hash" != "$jar_hash" ]; then
- last_modified=$(curl -sS --head --cacert "$ca_file" "$url" | grep -i '^last-modified:' | head -1)
-
- echo "$0: sha256 mismatch for $jar_path due to server-side update" >&2
- echo "$0: expected: $url_hash" >&2
- echo "$0: actual: $jar_hash" >&2
- echo "$0: $last_modified" >&2
- echo "$0: run the following to download the new client JAR, then update your derivation:" >&2
- echo "$0: \$ ${unwrappedWithGaudi.update-gaudi}" >&2
-
- exit 1
- fi
-
- cache_path_1="''${XDG_CACHE_HOME:-$HOME/.cache}/Agente-GAUDI"
- cache_path_2="''${XDG_CACHE_HOME:-$HOME/.cache}/Firmador-BCCR"
-
- for cache_path in "$cache_path_1" "$cache_path_2"; do
- mkdir -p "$cache_path"
- ln -sf -- ${unwrappedWithGaudi.gaudi}/share/java/bccr-firma-fva-clienteMultiplataforma.jar "$cache_path"
- done
-
- cp -f --no-preserve=mode -t "$cache_path_1" -- "${unwrappedWithGaudi.gaudi}/share/java/config.properties"
-
- exec gaudi
- '')
- ];
-
- runScript = "launch-gaudi";
- }
diff --git a/pkgs/athena-bccr/releases.nix b/pkgs/athena-bccr/releases.nix
deleted file mode 100644
index e965172..0000000
--- a/pkgs/athena-bccr/releases.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "deb64-rev26" = {
- # nix hash convert --hash-algo sha256 --from base16 --to sri $(sha256sum sfd_ClientesLinux_DEB64_Rev26.zip | cut -d' ' -f1)
- hash = "sha256-ZPWP9TqJQ5coJAPzUSiaXKVItBWlqFM4smCjOf+gqQM=";
- basename = "sfd_ClientesLinux_DEB64_Rev26";
-
- srcPaths = {
- gaudi = "Firma Digital/Agente GAUDI/agente-gaudi_20.0_amd64.deb";
- idprotect = "Firma Digital/PinTool/IDProtect PINTool 7.24.02/DEB/idprotectclient_7.24.02-0_amd64.deb";
- };
- };
-}
diff --git a/pkgs/athena-bccr/unwrapped.nix b/pkgs/athena-bccr/unwrapped.nix
deleted file mode 100644
index d6f3f38..0000000
--- a/pkgs/athena-bccr/unwrapped.nix
+++ /dev/null
@@ -1,226 +0,0 @@
-{
- lib,
- requireFile,
- release,
- gaudiHash ? null,
- ...
-}: let
- inherit (release) srcPaths;
-
- src = requireFile {
- url = "https://soportefirmadigital.com";
- name = "${release.basename}.zip";
-
- inherit (release) hash;
- };
-
- gaudiUpdateSrc = {update-gaudi}:
- requireFile {
- url = "${update-gaudi}";
- name = "gaudi-update-${release.name}.zip";
-
- hash = gaudiHash;
- };
-
- moduleFromDeb = name: args @ {
- stdenv,
- dpkg,
- unzip,
- srcPath,
- ...
- }:
- stdenv.mkDerivation ({
- pname = "${name}-unwrapped";
- version = release.name;
-
- inherit src;
-
- nativeBuildInputs = [dpkg unzip] ++ (args.nativeBuildInputs or []);
-
- postUnpack = ''
- dpkg -x ${lib.escapeShellArg "${release.basename}/${srcPath}"} ${lib.escapeShellArg release.basename}
- '';
- }
- // lib.removeAttrs args ["stdenv" "dpkg" "unzip" "srcPath" "nativeBuildInputs"]);
-in {
- ase-idprotect = {
- autoPatchelfHook,
- dpkg,
- fontconfig,
- freetype,
- pcsclite,
- stdenv,
- unzip,
- xorg,
- zlib,
- ...
- }:
- moduleFromDeb "ase-idprotect" {
- inherit dpkg stdenv unzip;
- srcPath = srcPaths.idprotect;
-
- buildInputs = [
- fontconfig
- freetype
- pcsclite
- stdenv.cc.cc.lib
- xorg.libX11
- xorg.libXext
- zlib
- ];
-
- nativeBuildInputs = [
- autoPatchelfHook
- ];
-
- outputs = ["out" "lib"];
-
- installPhase = ''
- runHook preInstall
-
- install -m755 -d $out/bin $lib/{etc,lib/x64-athena}
- install -m755 usr/bin/IDProtect{_Manager,PINTool} $out/bin/
- install -m755 usr/lib/x64-athena/* $lib/lib/x64-athena
- cp -r etc/Athena $lib/etc/Athena
-
- runHook postInstall
- '';
-
- preFixup = ''
- patchelf --set-rpath $lib/lib/x64-athena $out/bin/*
- '';
- };
-
- gaudi = {
- autoPatchelfHook,
- dpkg,
- makeWrapper,
- openjdk,
- pkgs,
- stdenv,
- unzip,
- writeShellScriptBin,
- update-gaudi,
- ...
- }: let
- jdk = openjdk.override {
- enableJavaFX = true;
- openjfx_jdk = pkgs."openjfx${lib.head (lib.splitString "." openjdk.version)}".override {withWebKit = true;};
- };
-
- fakeSudo = writeShellScriptBin "sudo" "";
- gaudiUpdate = gaudiUpdateSrc {inherit update-gaudi;};
- in
- moduleFromDeb "gaudi" {
- inherit dpkg stdenv unzip;
- srcPath = srcPaths.gaudi;
-
- nativeBuildInputs = [
- autoPatchelfHook
- jdk
- makeWrapper
- ];
-
- preBuild = lib.optionalString (gaudiHash != null) ''
- unzip -o ${gaudiUpdate} -d opt/Agente-GAUDI/lib/app
- '';
-
- buildPhase = ''
- runHook preBuild
-
- install -m755 -d $out/{bin,opt/Firmador-BCCR/lib}
- cp -r opt/Agente-GAUDI/lib/app $out/opt/Firmador-BCCR/lib/app
-
- # Preserves the original filename and avoids <hash>-LaunchGaudi.java
- ln -s ${./LaunchGaudi.java} LaunchGaudi.java
-
- javac \
- -cp opt/Agente-GAUDI/lib/app/bccr-firma-fva-clienteMultiplataforma.jar \
- -d $out/opt/Firmador-BCCR/lib/app \
- LaunchGaudi.java
-
- runHook postBuild
- '';
-
- installPhase = ''
- runHook preInstall
-
- install -m755 -d $out/{share,opt/Firmador-BCCR/lib/runtime/lib}
- install -m755 -D opt/Agente-GAUDI/bin/Agente-GAUDI $out/opt/Firmador-BCCR/bin/Agente-GAUDI
- install -m755 -D opt/Agente-GAUDI/lib/libapplauncher.so $out/opt/Firmador-BCCR/lib/libapplauncher.so
-
- ln -s ../opt/Firmador-BCCR/lib/app $out/share/java
- ln -s Firmador-BCCR $out/opt/Agente-GAUDI
- ln -s ${jdk}/lib/openjdk/lib/libjli.so $out/opt/Firmador-BCCR/lib/runtime/lib/libjli.so
-
- makeWrapper ${jdk}/bin/java $out/bin/gaudi \
- --prefix PATH : ${fakeSudo}/bin \
- --add-flags "-cp $out/share/java:$out/share/java/bccr-firma-fva-clienteMultiplataforma.jar" \
- --add-flags "-Djavax.net.ssl.trustStore=$out/opt/Firmador-BCCR/lib/app/bccr.cacerts" \
- --add-flags "LaunchGaudi"
-
- runHook postInstall
- '';
- };
-
- bccr-cacerts = {
- openssl,
- stdenv,
- unzip,
- ...
- }:
- stdenv.mkDerivation {
- pname = "bccr-cacerts";
- version = release.name;
-
- inherit src;
-
- nativeBuildInputs = [
- openssl
- unzip
- ];
-
- installPhase = ''
- cp -r Firma\ Digital/Certificados $out
- openssl x509 -in $out/CA\ RAIZ\ NACIONAL\ -\ COSTA\ RICA\ v2.crt -out $out/root-ca.pem -text
- '';
- };
-
- update-gaudi = {
- wget,
- writeShellScript,
- zip,
- bccr-cacerts,
- ...
- }:
- writeShellScript "update-gaudi" ''
- set -o errexit
- set -o pipefail
- set -o nounset
-
- temp_dir="$(mktemp -d)"
- trap 'cd / && rm -rf -- "$temp_dir"' EXIT
- cd "$temp_dir"
-
- PATH="${lib.makeBinPath [wget zip]}:$PATH"
- ca_cert="${bccr-cacerts}/root-ca.pem"
- base_url="https://www.firmadigital.go.cr/Bccr.Firma.Fva.Actualizador.ClienteFirmadorJava//recursosLiberica17/actualizador"
-
- wget --ca-certificate="$ca_cert" "$base_url/bccr.cacerts"
- wget --ca-certificate="$ca_cert" "$base_url/config.properties"
- wget --ca-certificate="$ca_cert" "$base_url/bccr-firma-fva-clienteMultiplataforma.jar"
- wget --ca-certificate="$ca_cert" "$base_url/ServicioActualizadorClienteBCCR.jar"
-
- # https://gist.github.com/stokito/c588b8d6a6a0aee211393d68eea678f2
- TZ=UTC find . -exec touch --no-dereference -a -m -t 198002010000.00 {} +
- zip_path="$PWD/gaudi-update-${release.name}.zip"
- TZ=UTC zip -q --move --recurse-paths --symlinks -X "$zip_path" .
- TZ=UTC touch -a -m -t 198002010000.00 "$zip_path"
-
- set -x
- nix-store --add-fixed sha256 "$zip_path"
- set +x
-
- echo -e "\ngaudiHash: $(nix-hash --to-sri --type sha256 $(sha256sum "$zip_path" | cut -d' ' -f1))"
- '';
-}
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 9f74497..c7e0445 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -8,7 +8,6 @@ with prev.lib; let
in {
lib = callPackage ./lib {};
- athena-bccr = callPackage ./athena-bccr {};
btclone = callPackage ./btclone {};
gem5 = callPackage ./gem5.nix {gem5ISA = "x86";};
git-aliases = callPackage ./git-aliases.nix {};
diff --git a/sys/hardware/athena.nix b/sys/hardware/athena.nix
deleted file mode 100644
index 755c184..0000000
--- a/sys/hardware/athena.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-with lib; let
- cfg = config.local.hardware.athena;
-
- athena = pkgs.local.athena-bccr.${cfg.release};
-in {
- options.local.hardware.athena = {
- enable = mkEnableOption "Athena ASEDrive III smartcard reader";
-
- release = mkOption {
- type = types.str;
- default = "latest";
- description = "athena-bccr release tag";
- };
- };
-
- config = mkIf cfg.enable {
- environment = {
- etc = {
- "Athena".source = "${athena.ase-pkcs11}/etc/Athena";
-
- "pkcs11/modules/asep11".text = ''
- module: ${athena.libasep11}
- '';
- };
-
- systemPackages = [athena.ase-pkcs11];
- };
-
- #FIXME: Extremadamente peligroso si BCCR o MICITT caen, investigar política nacional de root CA
- security.pki.certificateFiles = ["${athena.bccr-cacerts}/root-ca.pem"];
-
- services = {
- pcscd.enable = true;
-
- #TODO: Sería mejor agregar un grupo separado
- udev.extraRules = ''
- # Athena Smartcard Solutions, Inc. ASEDrive V3CR
- ATTRS{idVendor}=="0dc3", ATTRS{idProduct}=="1004", MODE="660", GROUP="users", TAG+="uaccess"
- '';
- };
- };
-}
diff --git a/sys/hardware/default.nix b/sys/hardware/default.nix
index 2ded912..10bdece 100644
--- a/sys/hardware/default.nix
+++ b/sys/hardware/default.nix
@@ -1,7 +1,6 @@
{
imports = [
./altera.nix
- ./athena.nix
./apc.nix
./bluetooth.nix
./epson.nix
diff --git a/trivionomicon/modules/waybar/default.nix b/trivionomicon/modules/waybar/default.nix
new file mode 100644
index 0000000..97cacf3
--- /dev/null
+++ b/trivionomicon/modules/waybar/default.nix
@@ -0,0 +1,13 @@
+{
+ config,
+ lib,
+ pkgs,
+ doctrine,
+ ...
+}:
+doctrine.lib.mkModule {
+ inherit config;
+ name = "waybar";
+ hm = ./hm.nix;
+ options = ./options.nix;
+}
diff --git a/trivionomicon/modules/waybar/hm.nix b/trivionomicon/modules/waybar/hm.nix
new file mode 100644
index 0000000..1bfa3e2
--- /dev/null
+++ b/trivionomicon/modules/waybar/hm.nix
@@ -0,0 +1,207 @@
+{
+ lib,
+ pkgs,
+ cfg,
+ doctrine,
+ ...
+}:
+with lib; {
+ programs.waybar = {
+ enable = true;
+ settings = {
+ mainBar = {
+ layer = "top";
+ position = "top";
+ height = 20;
+ spacing = 0;
+
+ modules-left = [
+ "sway/workspaces"
+ "sway/mode"
+ ];
+ modules-center = [
+ "clock"
+ ];
+
+ modules-right =
+ [
+ "keyboard-state"
+ "privacy"
+ "idle_inhibitor"
+ "cpu"
+ "memory"
+ "disk"
+ "temperature"
+ "tray"
+ ]
+ ++ lists.optionals cfg.battery [
+ "battery"
+ ];
+ battery = mkIf cfg.battery {
+ format = "{capacity}% {icon}";
+ format-plugged = "{capacity}% 󱐥{icon}";
+ format-icons = ["󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
+ states = {
+ warning = 20;
+ critical = 10;
+ };
+ };
+ keyboard-state = {
+ capslock = true;
+ format.capslock = "{icon}";
+ format-icons = {
+ locked = "󰘲 ";
+ unlocked = "";
+ };
+ };
+ idle_inhibitor = {
+ format = "{icon}";
+ format-icons = {
+ activated = " ";
+ deactivated = " ";
+ };
+ };
+ tray = {
+ icon-size = 13;
+ spacing = 8;
+ };
+ clock = {
+ interval = 60;
+ format = "{:%A %B %d %Y %H:%M}";
+ tooltip = false;
+ };
+ cpu = {
+ format = " {usage}%";
+ tooltip = false;
+ };
+ memory = {
+ format = " {percentage}% ";
+ tooltip = true;
+ tooltip-format = "{used}/{total}";
+ };
+ disk = {
+ format = " {specific_used:0.0f}/{specific_total:0.0f}";
+ unit = "GiB";
+ tooltip = false;
+ };
+ temperature = {
+ format = " {temperatureC}°C";
+ };
+ privacy = {
+ icon-size = 12;
+ };
+ };
+ };
+ style = ''
+ * {
+ font-family: "${cfg.fontFamily}", monospace;
+ font-size: ${cfg.fontSize};
+ font-weight: 500;
+ border: none;
+ box-shadow: none;
+ }
+
+ /* Entire bar: fully transparent, no border */
+ window#waybar {
+ background: transparent;
+ color: #eaeaea;
+ margin: 0;
+ padding: 0;
+ }
+
+ /* Optional: small edge breathing room (comment out if you want edge-to-edge) */
+ /* window#waybar { margin: 3px 6px 0 6px; } */
+
+ /* Module containers */
+ .modules-left, .modules-center, .modules-right {
+ padding: 0;
+ margin: 0 6px;
+ }
+
+ /* Subtle separators between modules (no boxes) */
+ .modules-left > widget:not(:first-child),
+ .modules-center > widget:not(:first-child),
+ .modules-right > widget:not(:first-child) {
+ margin-left: 12px;
+ padding-left: 12px;
+ border-left: 1px solid rgba(255, 255, 255, 0.08);
+ }
+
+ /* Tightest possible workspaces */
+ #workspaces { padding: 0; margin: 0; }
+ #workspaces button {
+ margin: 0;
+ padding: 0 3px;
+ min-width: 0;
+ border-radius: 0;
+ background: transparent;
+ color: #cfcfcf;
+ }
+ #workspaces button:hover {
+ background: rgba(255, 255, 255, 0.06);
+ }
+ #workspaces button.active,
+ #workspaces button.focused {
+ background: rgba(255, 255, 255, 0.10);
+ color: #ffffff;
+ box-shadow: inset 0 -2px #ffffff;
+ }
+ #workspaces button.urgent {
+ background: rgba(255, 80, 80, 0.25);
+ box-shadow: inset 0 -2px #ff5050;
+ }
+
+ /* Focused window title: single line, no glow */
+ #window {
+ padding: 0 6px;
+ margin: 0;
+ color: #dedede;
+ }
+
+ /* Sway mode indicator: visible only when active, no bloat */
+ #mode {
+ padding: 0 6px;
+ margin: 0;
+ background: rgba(255, 255, 255, 0.10);
+ color: #ffffff;
+ box-shadow: inset 0 -2px #ffffff;
+ }
+
+ /* Status modules — keep them flat and compact */
+ #clock, #battery, #network, #pulseaudio, #backlight, #cpu, #memory, #temperature, #tray {
+ padding: 0 6px;
+ margin: 0;
+ background: transparent;
+ color: #eaeaea;
+ }
+
+ /* States (battery, network, audio) */
+ #battery.charging { color: #27f902; }
+ #battery.warning:not(.charging) { color: #fc8b02; }
+ #battery.critical:not(.charging) { color: #fc0000; }
+
+ #network.disconnected { color: #ffb4b4; }
+ #pulseaudio.muted { color: #9aa0a6; }
+
+ /* Tray: compress icons */
+ #tray > .passive { opacity: 0.6; }
+ #tray > .needs-attention { opacity: 1; }
+
+ /* Tooltips: clean and readable */
+ tooltip {
+ background: rgba(30, 30, 30, 0.95);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ color: #eaeaea;
+ padding: 6px 8px;
+ }
+
+ /* Remove any leftover borders around everything */
+ #custom-*, #idle_inhibitor, #privacy, #bluetooth {
+ border: none;
+ background: transparent;
+ margin: 0;
+ padding: 0 6px;
+ }
+ '';
+ };
+}
diff --git a/trivionomicon/modules/waybar/options.nix b/trivionomicon/modules/waybar/options.nix
new file mode 100644
index 0000000..b2daa33
--- /dev/null
+++ b/trivionomicon/modules/waybar/options.nix
@@ -0,0 +1,23 @@
+{lib, ...}:
+with lib.types; {
+ hm = {
+ battery = lib.mkOption {
+ type = bool;
+ default = false;
+ description = ''
+ `true` to display battery info
+ '';
+ };
+ fontFamily = lib.mkOption {
+ type = str;
+ example = "JetBrainsMono Nerd Font";
+ description = ''
+ needs to be a nerdfont
+ '';
+ };
+ fontSize = lib.mkOption {
+ type = str;
+ default = "12px";
+ };
+ };
+}
diff --git a/trivionomicon/pkgs/athena-bccr/firmador.nix b/trivionomicon/pkgs/athena-bccr/firmador.nix
index d280b56..068dea3 100644
--- a/trivionomicon/pkgs/athena-bccr/firmador.nix
+++ b/trivionomicon/pkgs/athena-bccr/firmador.nix
@@ -27,7 +27,7 @@ in
./0001-Remove-CheckUpdatePlugin-from-default-list.patch
];
- mvnHash = "sha256-h1zoStTgaE7toWWKq0Y0ahOORyltChwjmaMYjLgs1VE=";
+ mvnHash = "sha256-CYrxWCuR73JDN0xEAuIMVw30RmjjjrnMdIJ4oc0c3zM=";
nativeBuildInputs = [
makeWrapper