From 3c65e8e78d4044bce0dc964b1b29ede29b47ca87 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 14:43:57 -0500 Subject: [PATCH 01/70] fix gaypanel --- wrappers/desktop/gaypanel/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrappers/desktop/gaypanel/default.nix b/wrappers/desktop/gaypanel/default.nix index b333632..191232e 100644 --- a/wrappers/desktop/gaypanel/default.nix +++ b/wrappers/desktop/gaypanel/default.nix @@ -8,7 +8,7 @@ let bar = pkgs.writeText "top.blp" '' using Gtk 4.0; - $GayPanel panel { + $ShellPanel panel { anchor-direction: top; monitor: "all"; From 8444754cf4b401ec3638e57180e0f4ce9e1785ff Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 14:43:57 -0500 Subject: [PATCH 02/70] fix gaypanel --- wrappers/desktop/gaypanel/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrappers/desktop/gaypanel/default.nix b/wrappers/desktop/gaypanel/default.nix index 191232e..923d118 100644 --- a/wrappers/desktop/gaypanel/default.nix +++ b/wrappers/desktop/gaypanel/default.nix @@ -72,7 +72,7 @@ let padding: 2px 12px; } - window.panel { + panel { background: alpha(var(--window-bg-color), 0.5); } From c5c04a8aac393cfde6ddc433b808871e28bf67a9 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 16:24:31 -0500 Subject: [PATCH 03/70] add niri mobile --- flake.lock | 69 +++++------------ flake.nix | 6 +- modules/mobile/gnome-mobile.nix | 56 -------------- modules/mobile/niri.nix | 126 ++++++++++++++++++++++++++++++++ 4 files changed, 148 insertions(+), 109 deletions(-) delete mode 100644 modules/mobile/gnome-mobile.nix create mode 100644 modules/mobile/niri.nix diff --git a/flake.lock b/flake.lock index 4686ce0..8dbe042 100644 --- a/flake.lock +++ b/flake.lock @@ -814,25 +814,6 @@ "type": "github" } }, - "gnome-mobile": { - "inputs": { - "gnome-shell-mobile": "gnome-shell-mobile", - "mutter-mobile": "mutter-mobile", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 0, - "narHash": "sha256-nO7cqicSHCjn96qMIV1JKwDei3n56Ra4G6rtaePbu3k=", - "type": "git", - "url": "file:///home/quadradical/Documents/Code/nixos-gnome-mobile" - }, - "original": { - "type": "git", - "url": "file:///home/quadradical/Documents/Code/nixos-gnome-mobile" - } - }, "gnome-shell": { "flake": false, "locked": { @@ -852,21 +833,6 @@ "type": "gitlab" } }, - "gnome-shell-mobile": { - "flake": false, - "locked": { - "dirtyRev": "c602286053f9e06b3493decb4a9dabe8ba20ad9c-dirty", - "dirtyShortRev": "c60228605-dirty", - "lastModified": 1793323139, - "narHash": "sha256-DTqRtdXSwmb8ovlEmzVf7CcwtjRgpXinuWCb+1CgTc0=", - "type": "git", - "url": "file:///home/quadradical/Documents/Code/gnome-shell-mobile" - }, - "original": { - "type": "git", - "url": "file:///home/quadradical/Documents/Code/gnome-shell-mobile" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -921,21 +887,6 @@ "url": "https://git.federated.nexus/Henry-Hiles/matrixoidc" } }, - "mutter-mobile": { - "flake": false, - "locked": { - "dirtyRev": "7e7b25f68c7719ebf3b651808824e0c8bd33020d-dirty", - "dirtyShortRev": "7e7b25f68-dirty", - "lastModified": 1793323139, - "narHash": "sha256-mvdRwZfbnlzBrwr0bT4ZItYcM15smb7gkpppwIEp64k=", - "type": "git", - "url": "file:///home/quadradical/Documents/Code/mutter-mobile" - }, - "original": { - "type": "git", - "url": "file:///home/quadradical/Documents/Code/mutter-mobile" - } - }, "nexus": { "inputs": { "continuwuity": "continuwuity_2", @@ -981,6 +932,24 @@ "url": "https://git.federated.nexus/federated-nexus/nexusbot" } }, + "niri-mobile": { + "flake": false, + "locked": { + "lastModified": 1794856587, + "narHash": "sha256-3QcIjmE7szOtZKpWXg36lcPZ/v8vFW3SkYrg59M9GT4=", + "ref": "quad/mobile-testing", + "rev": "9256350fa5b80e7420661e369a2bca91522a1690", + "shallow": true, + "type": "git", + "url": "file:///home/quadradical/Documents/Code/niri" + }, + "original": { + "ref": "quad/mobile-testing", + "shallow": true, + "type": "git", + "url": "file:///home/quadradical/Documents/Code/niri" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -1248,12 +1217,12 @@ "flake-parts": "flake-parts_5", "gadgetfs": "gadgetfs", "gaypanel": "gaypanel", - "gnome-mobile": "gnome-mobile", "home-manager": "home-manager", "lk-jwt-service-module": "lk-jwt-service-module", "matrixoidc": "matrixoidc", "nexus": "nexus", "nexusbot": "nexusbot", + "niri-mobile": "niri-mobile", "nix-maid": "nix-maid", "nixphone": "nixphone", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 3618f6d..3ae915f 100755 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,9 @@ url = "github:sorki/nixos-gadgetfs-proto"; flake = false; }; - gnome-mobile = { - url = "git+file:///home/quadradical/Documents/Code/nixos-gnome-mobile"; - inputs.nixpkgs.follows = "nixpkgs"; + niri-mobile = { + url = "git+file:///home/quadradical/Documents/Code/niri?ref=quad/mobile-testing&shallow=1"; + flake = false; }; nixphone = { url = "git+https://codeberg.org/nixphone/nixphone"; diff --git a/modules/mobile/gnome-mobile.nix b/modules/mobile/gnome-mobile.nix deleted file mode 100644 index 72b12d9..0000000 --- a/modules/mobile/gnome-mobile.nix +++ /dev/null @@ -1,56 +0,0 @@ -# GNOME Shell mobile. GDM and the GNOME services/apps are in modules/graphical/gnome. -{ inputs, pkgs, ... }: -{ - nixpkgs.overlays = [ inputs.gnome-mobile.overlays.default ]; - - services = { - desktopManager.gnome = { - enable = true; - - # One app per workspace - extraGSettingsOverrides = '' - [org.gnome.mutter] - dynamic-workspaces=true - ''; - extraGSettingsOverridePackages = [ pkgs.mutter ]; - }; - - logind.settings.Login = { - HandlePowerKey = "ignore"; - HandlePowerKeyLongPress = "poweroff"; - }; - }; - - # GNOME talks to IBus over D-Bus, with these set the on-screen keyboard won't show up. - environment.extraInit = '' - unset GTK_IM_MODULE QT_IM_MODULE XMODIFIERS - ''; - - users.users.quadradical.maid.gsettings.settings.org.gnome = { - desktop = { - search-providers.sort-order = [ - "org.gnome.Contacts.desktop" - "org.gnome.Documents.desktop" - "org.gnome.Nautilus.desktop" - ]; - - background = rec { - picture-uri = "file://${../../background.jpg}"; - picture-uri-dark = picture-uri; - }; - - lockdown.user-administration-disabled = true; - }; - - system.location.enabled = true; - - shell = { - remember-mount-password = true; - favorite-apps = [ - "librewolf.desktop" - "org.gnome.Geary.desktop" - "org.gnome.Nautilus.desktop" - ]; - }; - }; -} diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix new file mode 100644 index 0000000..d527c9c --- /dev/null +++ b/modules/mobile/niri.nix @@ -0,0 +1,126 @@ +{ + inputs, + lib, + pkgs, + ... +}: +let + src = inputs.niri-mobile; + + niri = pkgs.niri.overrideAttrs (old: { + inherit src; + cargoDeps = pkgs.rustPlatform.importCargoLock { + lockFile = "${src}/Cargo.lock"; + allowBuiltinFetchGit = true; + }; + env = old.env // { + NIRI_BUILD_COMMIT = "quad-mobile-${src.shortRev}"; + }; + }); + + # Placeholder app grid, from test-shell/ in the clone. + grid = pkgs.stdenvNoCC.mkDerivation { + name = "niri-test-grid"; + src = "${src}/test-shell/grid.js"; + dontUnpack = true; + + nativeBuildInputs = with pkgs; [ + gobject-introspection + makeWrapper + wrapGAppsHook4 + ]; + buildInputs = with pkgs; [ + gjs + gtk4 + gtk4-layer-shell + ]; + + installPhase = '' + install -Dm644 $src $out/share/niri-test-grid/grid.js + # gtk4-layer-shell has to be loaded before libwayland-client. + makeWrapper ${lib.getExe' pkgs.gjs "gjs"} $out/bin/niri-test-grid \ + --add-flags "-m $out/share/niri-test-grid/grid.js" \ + --set LD_PRELOAD ${pkgs.gtk4-layer-shell}/lib/libgtk4-layer-shell.so \ + --set NIRI_BIN ${lib.getExe niri} + ''; + }; + + swayosdStyle = pkgs.writeText "swayosd.css" '' + @import url("file://${pkgs.swayosd}/etc/xdg/swayosd/style.css"); + + window#osd { + background: shade(@theme_bg_color, 1.15); + } + ''; + + swayosd-client = lib.getExe' pkgs.swayosd "swayosd-client"; +in +{ + programs.niri = { + enable = true; + package = niri; + }; + + environment.etc."niri/config.kdl".text = '' + input { + touch { edge-swipe-size 24; } + } + + layout { + gaps 16 + struts { + left -16 + right -16 + top -16 + bottom -16 + } + center-focused-column "always" + default-column-width { proportion 1.0; } + } + + // zoom and workspace-anchor have to match the constants in test-shell/grid.js. + overview { + zoom 0.25 + workspace-anchor 0.15 + hide-inactive-workspaces + swipe-to-close + swipe-down-to-focus + } + + layer-rule { + match namespace="^niri-test-grid$" + follow-overview true + } + + layer-rule { + match namespace="^wallpaper$" + place-within-backdrop true + } + + prefer-no-csd + + spawn-at-startup "${lib.getExe pkgs.swaybg}" "-i" "${../../background.jpg}" "-m" "fill" + spawn-at-startup "${lib.getExe grid}" + spawn-at-startup "${lib.getExe pkgs.stevia}" + spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" + + binds { + XF86AudioRaiseVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "raise"; } + XF86AudioLowerVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "lower"; } + } + ''; + + services.logind.settings.Login = { + HandlePowerKey = "ignore"; + HandlePowerKeyLongPress = "poweroff"; + }; + + # Let GTK use text-input-v3, so the on-screen keyboard gets the text fields. + environment.extraInit = '' + unset GTK_IM_MODULE QT_IM_MODULE XMODIFIERS + ''; + + # The on-screen keyboard only shows itself with this on. + users.users.quadradical.maid.gsettings.settings.org.gnome.desktop.a11y.applications.screen-keyboard-enabled = + true; +} From 502f41380b436e8a08192915ce4e1128d5d997b0 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 17:40:41 -0500 Subject: [PATCH 04/70] swap to gtklock --- flake.lock | 6 +- modules/desktop/wm/fht-compositor/default.nix | 2 + modules/desktop/wm/lockscreen.nix | 52 ++---- .../{gnome/default.nix => gnome.nix} | 19 +- modules/graphical/gtklock.nix | 175 ++++++++++++++++++ modules/graphical/login.nix | 23 +++ modules/mobile/niri.nix | 17 +- .../mobile/stevia-optional-device-state.patch | 22 +++ 8 files changed, 270 insertions(+), 46 deletions(-) rename modules/graphical/{gnome/default.nix => gnome.nix} (72%) create mode 100644 modules/graphical/gtklock.nix create mode 100644 modules/graphical/login.nix create mode 100644 modules/mobile/stevia-optional-device-state.patch diff --git a/flake.lock b/flake.lock index 8dbe042..a3f7ad0 100644 --- a/flake.lock +++ b/flake.lock @@ -935,10 +935,10 @@ "niri-mobile": { "flake": false, "locked": { - "lastModified": 1794856587, - "narHash": "sha256-3QcIjmE7szOtZKpWXg36lcPZ/v8vFW3SkYrg59M9GT4=", + "lastModified": 1794866348, + "narHash": "sha256-xOlwRx2pt3b/XGu7C1HBF8OljMrRV1whr+PL5o+czlM=", "ref": "quad/mobile-testing", - "rev": "9256350fa5b80e7420661e369a2bca91522a1690", + "rev": "fb33c8f8fa9ed74ea5477d6f6caf258f5733aae4", "shallow": true, "type": "git", "url": "file:///home/quadradical/Documents/Code/niri" diff --git a/modules/desktop/wm/fht-compositor/default.nix b/modules/desktop/wm/fht-compositor/default.nix index 8a87cad..1813821 100644 --- a/modules/desktop/wm/fht-compositor/default.nix +++ b/modules/desktop/wm/fht-compositor/default.nix @@ -63,6 +63,8 @@ in "org.freedesktop.impl.portal.ScreenCast" = [ "fht-compositor" ]; }; + quad.session = lib.getExe' cfg.package "fht-compositor-session"; + environment = { # Called by name (rather than by store path), so Super+Ctrl+R after a rebuild runs the new version systemPackages = [ session-programs ]; diff --git a/modules/desktop/wm/lockscreen.nix b/modules/desktop/wm/lockscreen.nix index 6afec7a..ee6b0d4 100644 --- a/modules/desktop/wm/lockscreen.nix +++ b/modules/desktop/wm/lockscreen.nix @@ -4,49 +4,21 @@ lib, ... }: +let + lock = "pidof gtklock || ${lib.getExe config.programs.gtklock.package}"; +in { services.logind.settings.Login.HandlePowerKey = "suspend"; - programs = { - hyprlock.enable = true; + programs.fht-compositor = { + # We log in automatically, so lock straight away. + settings.autostart = [ lock ]; - fht-compositor.sessionPrograms.hypridle = - "${lib.getExe pkgs.hypridle} --config ${pkgs.writeText "hypridle.conf" '' - general { - lock_cmd = pidof hyprlock || ${lib.getExe pkgs.hyprlock} --config ${ - let - inherit (config.lib.stylix) colors; - in - pkgs.writeText "hyprlock.conf" '' - background { - path = screenshot - blur_passes = 3 - } - - label { - text = $TIME - font_size = 96 - position = 0, 200 - } - - label { - text = cmd[update:60000] date +"%A, %B %-d" - font_size = 20 - position = 0, 110 - } - - input-field { - size = 300, 50 - outline_thickness = 0 - inner_color = rgb(${colors.base01}) - font_color = rgb(${colors.base05}) - check_color = rgb(${colors.base0D}) - fade_on_empty = false - } - '' - } - before_sleep_cmd = loginctl lock-session - } - ''}"; + sessionPrograms.hypridle = "${lib.getExe pkgs.hypridle} --config ${pkgs.writeText "hypridle.conf" '' + general { + lock_cmd = ${lock} + before_sleep_cmd = loginctl lock-session + } + ''}"; }; } diff --git a/modules/graphical/gnome/default.nix b/modules/graphical/gnome.nix similarity index 72% rename from modules/graphical/gnome/default.nix rename to modules/graphical/gnome.nix index 1448271..f0334ac 100644 --- a/modules/graphical/gnome/default.nix +++ b/modules/graphical/gnome.nix @@ -6,8 +6,6 @@ }: { services = { - displayManager.gdm.enable = true; - gnome = { core-os-services.enable = true; core-apps.enable = true; @@ -16,6 +14,23 @@ gvfs.enable = true; }; + systemd.user.tmpfiles.users.quadradical.rules = + let + keyring = pkgs.writeText "login.keyring" '' + [keyring] + display-name=Login + ctime=0 + mtime=0 + lock-on-idle=false + lock-after=false + ''; + in + [ + "d %h/.local/share/keyrings 0700 - - -" + "C %h/.local/share/keyrings/login.keyring 0600 - - - ${keyring}" + "f %h/.local/share/keyrings/default 0600 - - - login" + ]; + environment.sessionVariables.NAUTILUS_4_EXTENSION_DIR = lib.mkForce "${config.system.path}/lib/nautilus/extensions-4"; environment.gnome.excludePackages = with pkgs; [ diff --git a/modules/graphical/gtklock.nix b/modules/graphical/gtklock.nix new file mode 100644 index 0000000..6af55e2 --- /dev/null +++ b/modules/graphical/gtklock.nix @@ -0,0 +1,175 @@ +{ + config, + pkgs, + ... +}: +let + inherit (config.lib.stylix) colors; + + background = + pkgs.runCommand "lock-background.jpg" { nativeBuildInputs = [ pkgs.buildPackages.imagemagick ]; } + '' + magick ${../../background.jpg} -resize 50% -blur 0x16 -modulate 80 $out + ''; + + layout = pkgs.writeText "gtklock.ui" '' + + + + window-box + center + center + vertical + + + info-box + vertical + + + time-box + vertical + + + clock-label + + + + + date-label + + + + + + + + + none + + + center + 8 + + + 1 + + + + + input-field + 300 + 0.5 + 0 + 0 + password + Input Password + + + + 0 + + + + + none + 1 + + + never + 256 + 1 + + + + + vertical + 1 + + + + + + + + + 1 + + + + + center + 8 + + + warning-label + + + + + error-label + + + + + 1 + + + + + + 2 + + + + + + + + + ''; +in +{ + programs.gtklock = { + enable = true; + + config.main = { + layout = "${layout}"; + time-format = "%H:%M"; + date-format = "%A, %B %-d"; + }; + + style = '' + window { + background-image: url("${background}"); + background-size: cover; + background-position: center; + } + + #clock-label { + font-size: 96pt; + color: white; + } + + #date-label { + font-size: 20pt; + color: white; + margin-bottom: 80px; + } + + #input-field { + min-height: 50px; + padding: 0 20px; + border: none; + border-radius: 25px; + box-shadow: none; + background: #${colors.base01}; + color: #${colors.base05}; + } + + #error-label, + #warning-label { + color: #${colors.base08}; + } + ''; + }; +} diff --git a/modules/graphical/login.nix b/modules/graphical/login.nix new file mode 100644 index 0000000..135004b --- /dev/null +++ b/modules/graphical/login.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: +{ + options.quad.session = lib.mkOption { + type = lib.types.str; + description = "Command for the graphical session. greetd logs straight into it, and the session is expected to lock itself."; + }; + + config.services.greetd = { + enable = true; + settings = + let + initial_session = { + command = config.quad.session; + user = "quadradical"; + }; + in + { + inherit initial_session; + + default_session = initial_session; + }; + }; +} diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index d527c9c..13d20b7 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -1,4 +1,5 @@ { + config, inputs, lib, pkgs, @@ -54,6 +55,15 @@ let ''; swayosd-client = lib.getExe' pkgs.swayosd "swayosd-client"; + + # Stevia normally needs a phoc-only protocol to start. + stevia = pkgs.stevia.overrideAttrs (old: { + patches = (old.patches or [ ]) ++ [ ./stevia-optional-device-state.patch ]; + }); + + lock = pkgs.writeShellScript "lock" '' + ${lib.getExe' pkgs.procps "pidof"} gtklock || exec ${lib.getExe config.programs.gtklock.package} + ''; in { programs.niri = { @@ -101,15 +111,20 @@ in spawn-at-startup "${lib.getExe pkgs.swaybg}" "-i" "${../../background.jpg}" "-m" "fill" spawn-at-startup "${lib.getExe grid}" - spawn-at-startup "${lib.getExe pkgs.stevia}" + spawn-at-startup "${lib.getExe stevia}" spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" + // We log in automatically, so lock straight away. + spawn-at-startup "${lock}" binds { + XF86PowerOff { spawn "${lock}"; } XF86AudioRaiseVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "raise"; } XF86AudioLowerVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "lower"; } } ''; + quad.session = lib.getExe' niri "niri-session"; + services.logind.settings.Login = { HandlePowerKey = "ignore"; HandlePowerKeyLongPress = "poweroff"; diff --git a/modules/mobile/stevia-optional-device-state.patch b/modules/mobile/stevia-optional-device-state.patch new file mode 100644 index 0000000..b0cbbcb --- /dev/null +++ b/modules/mobile/stevia-optional-device-state.patch @@ -0,0 +1,22 @@ +--- a/src/pos-hw-tracker.c ++++ b/src/pos-hw-tracker.c +@@ -72,7 +72,9 @@ + gpointer device_state) + { + self->device_state = device_state; +- zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self); ++ /* Only phoc has the device state protocol. Without it, assume there is no hardware keyboard. */ ++ if (self->device_state) ++ zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self); + } + + +--- a/src/pos-wayland.c ++++ b/src/pos-wayland.c +@@ -387,6 +387,5 @@ + self->zwlr_foreign_toplevel_manager_v1 && + self->layer_shell && + self->zxdg_output_manager_v1 && +- self->zphoc_device_state_v1 && + self->wlr_data_control_manager); + } From f3f768482c21f595f293feccb8fdb97dc0580aa7 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 18:16:46 -0500 Subject: [PATCH 05/70] adjust niri --- flake.lock | 6 +++--- modules/mobile/niri.nix | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index a3f7ad0..d98061f 100644 --- a/flake.lock +++ b/flake.lock @@ -935,10 +935,10 @@ "niri-mobile": { "flake": false, "locked": { - "lastModified": 1794866348, - "narHash": "sha256-xOlwRx2pt3b/XGu7C1HBF8OljMrRV1whr+PL5o+czlM=", + "lastModified": 1794870539, + "narHash": "sha256-vLHkvy05FsJ4TtQmIKRAHJ3zOhZ438xciJP9W87gcSo=", "ref": "quad/mobile-testing", - "rev": "fb33c8f8fa9ed74ea5477d6f6caf258f5733aae4", + "rev": "4d18f5be39c918d02f0e87d3deda9a4be7833cbd", "shallow": true, "type": "git", "url": "file:///home/quadradical/Documents/Code/niri" diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 13d20b7..dce93c0 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -34,6 +34,7 @@ let gjs gtk4 gtk4-layer-shell + libadwaita ]; installPhase = '' @@ -72,6 +73,10 @@ in }; environment.etc."niri/config.kdl".text = '' + output "DSI-1" { + scale 3 + } + input { touch { edge-swipe-size 24; } } @@ -82,10 +87,10 @@ in left -16 right -16 top -16 - bottom -16 } center-focused-column "always" default-column-width { proportion 1.0; } + background-color "transparent" } // zoom and workspace-anchor have to match the constants in test-shell/grid.js. @@ -94,7 +99,13 @@ in workspace-anchor 0.15 hide-inactive-workspaces swipe-to-close - swipe-down-to-focus + swipe-down-to-exit + open-when-empty + workspace-shadow { off; } + } + + gestures { + workspace-switch { off; } } layer-rule { @@ -109,6 +120,10 @@ in prefer-no-csd + hotkey-overlay { + skip-at-startup + } + spawn-at-startup "${lib.getExe pkgs.swaybg}" "-i" "${../../background.jpg}" "-m" "fill" spawn-at-startup "${lib.getExe grid}" spawn-at-startup "${lib.getExe stevia}" From 777c05a31eb04af5feef8a12157f42b301f43dba Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 19:23:44 -0500 Subject: [PATCH 06/70] update niri config --- flake.lock | 23 ++++++++++++++++++--- flake.nix | 4 ++++ modules/mobile/niri.nix | 46 ++++++++++++++--------------------------- 3 files changed, 39 insertions(+), 34 deletions(-) diff --git a/flake.lock b/flake.lock index d98061f..e97efda 100644 --- a/flake.lock +++ b/flake.lock @@ -74,6 +74,22 @@ "type": "github" } }, + "app-grid": { + "flake": false, + "locked": { + "lastModified": 1794872137, + "narHash": "sha256-JRO9X4pEQWTAzcaZJCPsr/V9KofZPxCSqoDwd1JvVwk=", + "ref": "refs/heads/main", + "rev": "7a4867aafd4925731fb64eb04b2aad6f8a48d75a", + "revCount": 1, + "type": "git", + "url": "file:///home/quadradical/Documents/Code/app-grid" + }, + "original": { + "type": "git", + "url": "file:///home/quadradical/Documents/Code/app-grid" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -935,10 +951,10 @@ "niri-mobile": { "flake": false, "locked": { - "lastModified": 1794870539, - "narHash": "sha256-vLHkvy05FsJ4TtQmIKRAHJ3zOhZ438xciJP9W87gcSo=", + "lastModified": 1794874359, + "narHash": "sha256-4WkEfXu32FSa7OCoOY41h5lsz5ZDq5xofmqeveTXNv0=", "ref": "quad/mobile-testing", - "rev": "4d18f5be39c918d02f0e87d3deda9a4be7833cbd", + "rev": "bec4ace7571bda589c0f589097b143e5c7171ae3", "shallow": true, "type": "git", "url": "file:///home/quadradical/Documents/Code/niri" @@ -1208,6 +1224,7 @@ "inputs": { "agenix": "agenix", "agenix-cli": "agenix-cli", + "app-grid": "app-grid", "continuwuity": "continuwuity", "cozybot": "cozybot", "degoog": "degoog", diff --git a/flake.nix b/flake.nix index 3ae915f..a5785f3 100755 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,10 @@ url = "github:sorki/nixos-gadgetfs-proto"; flake = false; }; + app-grid = { + url = "git+file:///home/quadradical/Documents/Code/app-grid"; + flake = false; + }; niri-mobile = { url = "git+file:///home/quadradical/Documents/Code/niri?ref=quad/mobile-testing&shallow=1"; flake = false; diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index dce93c0..63e8136 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -19,33 +19,7 @@ let }; }); - # Placeholder app grid, from test-shell/ in the clone. - grid = pkgs.stdenvNoCC.mkDerivation { - name = "niri-test-grid"; - src = "${src}/test-shell/grid.js"; - dontUnpack = true; - - nativeBuildInputs = with pkgs; [ - gobject-introspection - makeWrapper - wrapGAppsHook4 - ]; - buildInputs = with pkgs; [ - gjs - gtk4 - gtk4-layer-shell - libadwaita - ]; - - installPhase = '' - install -Dm644 $src $out/share/niri-test-grid/grid.js - # gtk4-layer-shell has to be loaded before libwayland-client. - makeWrapper ${lib.getExe' pkgs.gjs "gjs"} $out/bin/niri-test-grid \ - --add-flags "-m $out/share/niri-test-grid/grid.js" \ - --set LD_PRELOAD ${pkgs.gtk4-layer-shell}/lib/libgtk4-layer-shell.so \ - --set NIRI_BIN ${lib.getExe niri} - ''; - }; + grid = pkgs.callPackage "${inputs.app-grid}/package.nix" { }; swayosdStyle = pkgs.writeText "swayosd.css" '' @import url("file://${pkgs.swayosd}/etc/xdg/swayosd/style.css"); @@ -65,6 +39,13 @@ let lock = pkgs.writeShellScript "lock" '' ${lib.getExe' pkgs.procps "pidof"} gtklock || exec ${lib.getExe config.programs.gtklock.package} ''; + + hypridleConfig = pkgs.writeText "hypridle.conf" '' + general { + lock_cmd = ${lock} + before_sleep_cmd = loginctl lock-session + } + ''; in { programs.niri = { @@ -87,13 +68,15 @@ in left -16 right -16 top -16 + bottom -16 } center-focused-column "always" default-column-width { proportion 1.0; } background-color "transparent" + focus-ring { off; } } - // zoom and workspace-anchor have to match the constants in test-shell/grid.js. + // zoom and workspace-anchor have to match the constants in the app grid. overview { zoom 0.25 workspace-anchor 0.15 @@ -109,8 +92,9 @@ in } layer-rule { - match namespace="^niri-test-grid$" - follow-overview true + match namespace="^app-grid$" + place-within-backdrop true + backdrop-input true } layer-rule { @@ -130,9 +114,9 @@ in spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" // We log in automatically, so lock straight away. spawn-at-startup "${lock}" + spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}" binds { - XF86PowerOff { spawn "${lock}"; } XF86AudioRaiseVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "raise"; } XF86AudioLowerVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "lower"; } } From 19f587733aa3263167dd85cf38f4264286ab803f Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 19:31:30 -0500 Subject: [PATCH 07/70] bump lock --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index e97efda..238c3ec 100644 --- a/flake.lock +++ b/flake.lock @@ -951,10 +951,10 @@ "niri-mobile": { "flake": false, "locked": { - "lastModified": 1794874359, - "narHash": "sha256-4WkEfXu32FSa7OCoOY41h5lsz5ZDq5xofmqeveTXNv0=", + "lastModified": 1794875336, + "narHash": "sha256-7Ot6o5bgixBruntwsQcoNX2ASukgxLzQS9fzCSCuSOw=", "ref": "quad/mobile-testing", - "rev": "bec4ace7571bda589c0f589097b143e5c7171ae3", + "rev": "27655fe6b05909051effae07b5440a320b56da0e", "shallow": true, "type": "git", "url": "file:///home/quadradical/Documents/Code/niri" From 9ed2241b31eb93b3009919e6d8490e9d4d0cf0f4 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 19:55:39 -0500 Subject: [PATCH 08/70] add new stevia patch --- modules/mobile/niri.nix | 8 ++++-- modules/mobile/stevia-reshow-on-tap.patch | 35 +++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 modules/mobile/stevia-reshow-on-tap.patch diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 63e8136..71b65a1 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -31,9 +31,13 @@ let swayosd-client = lib.getExe' pkgs.swayosd "swayosd-client"; - # Stevia normally needs a phoc-only protocol to start. stevia = pkgs.stevia.overrideAttrs (old: { - patches = (old.patches or [ ]) ++ [ ./stevia-optional-device-state.patch ]; + patches = (old.patches or [ ]) ++ [ + # Stevia normally needs a phoc-only protocol to start. + ./stevia-optional-device-state.patch + # Bring back stevia on textfield re-focus + ./stevia-reshow-on-tap.patch + ]; }); lock = pkgs.writeShellScript "lock" '' diff --git a/modules/mobile/stevia-reshow-on-tap.patch b/modules/mobile/stevia-reshow-on-tap.patch new file mode 100644 index 0000000..3f6f7de --- /dev/null +++ b/modules/mobile/stevia-reshow-on-tap.patch @@ -0,0 +1,35 @@ +--- a/src/pos-input-method.c ++++ b/src/pos-input-method.c +@@ -62,6 +62,8 @@ + PosImState *submitted; + + guint serial; ++ /* Activated again while already active, e.g. after tapping a focused text field. */ ++ gboolean reactivated; + }; + G_DEFINE_TYPE (PosInputMethod, pos_input_method, G_TYPE_OBJECT) + +@@ -93,8 +95,11 @@ + + g_debug ("%s", __func__); + +- if (self->pending->active == TRUE) ++ /* Let the keyboard show itself again if it was hidden by the user. */ ++ if (self->pending->active == TRUE) { ++ self->reactivated = TRUE; + return; ++ } + + self->pending->active = TRUE; + g_clear_pointer (&self->pending->surrounding_text, g_free); +@@ -194,8 +199,9 @@ + + self->submitted = pos_im_state_dup (self->pending); + +- if (current->active != self->submitted->active) ++ if (current->active != self->submitted->active || self->reactivated) + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACTIVE]); ++ self->reactivated = FALSE; + + if (g_strcmp0 (current->surrounding_text, self->submitted->surrounding_text) || + current->cursor != self->submitted->cursor || From 4f80f7de702ed6f2dcf96537bb1a7ccb61cadd65 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:09:53 -0500 Subject: [PATCH 09/70] add gnome settings --- flake.lock | 8 ++++---- modules/graphical/settings.nix | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 modules/graphical/settings.nix diff --git a/flake.lock b/flake.lock index 238c3ec..133e043 100644 --- a/flake.lock +++ b/flake.lock @@ -77,11 +77,11 @@ "app-grid": { "flake": false, "locked": { - "lastModified": 1794872137, - "narHash": "sha256-JRO9X4pEQWTAzcaZJCPsr/V9KofZPxCSqoDwd1JvVwk=", + "lastModified": 1794877575, + "narHash": "sha256-X6NYOOVCLq2R01SsEhrwbBuxfpVGWN1dwK0pNShe8iY=", "ref": "refs/heads/main", - "rev": "7a4867aafd4925731fb64eb04b2aad6f8a48d75a", - "revCount": 1, + "rev": "f7bd700f1d1a6f21138b6e3ad4aff7feda37dfd8", + "revCount": 2, "type": "git", "url": "file:///home/quadradical/Documents/Code/app-grid" }, diff --git a/modules/graphical/settings.nix b/modules/graphical/settings.nix new file mode 100644 index 0000000..197bc5f --- /dev/null +++ b/modules/graphical/settings.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + gnome-control-center + (makeDesktopItem { + name = "settings"; + desktopName = "Settings"; + exec = "env XDG_CURRENT_DESKTOP=GNOME gnome-control-center"; + icon = "org.gnome.Settings"; + startupWMClass = "org.gnome.Settings"; + categories = [ "Settings" ]; + }) + ]; +} From 28f7026ba0024ad6ca5f39312abd33a36c52116f Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:18:26 -0500 Subject: [PATCH 10/70] add nmgui for desktop, move g-c-c to mobile only --- modules/graphical/packages.nix | 1 + modules/{graphical => mobile}/settings.nix | 0 2 files changed, 1 insertion(+) rename modules/{graphical => mobile}/settings.nix (100%) diff --git a/modules/graphical/packages.nix b/modules/graphical/packages.nix index 913bbc3..4379ab2 100644 --- a/modules/graphical/packages.nix +++ b/modules/graphical/packages.nix @@ -8,6 +8,7 @@ gapless showtime resources + nmgui wl-clipboard google-cursor papirus-icon-theme diff --git a/modules/graphical/settings.nix b/modules/mobile/settings.nix similarity index 100% rename from modules/graphical/settings.nix rename to modules/mobile/settings.nix From 6e8da25d92d739b78bde692737d26c2336e4bc52 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:25:13 -0500 Subject: [PATCH 11/70] don't GC other profiles --- modules/common/nh.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/common/nh.nix b/modules/common/nh.nix index b161d99..fe5ce74 100644 --- a/modules/common/nh.nix +++ b/modules/common/nh.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let aliases = { upgrade = "nh os switch --update"; @@ -23,8 +28,15 @@ in ( command: host: pkgs.writeShellScriptBin command '' + # Stop other systems from getting GC'd + keep() { + path=$(nix build --no-link --print-out-paths \ + "${config.programs.nh.flake}#nixosConfigurations.${host}.config.system.build.toplevel") + sudo nix-env --profile /nix/var/nix/profiles/${host} --set "$path" + } + ${lib.concatMapAttrsStringSep "\n" ( - name: cmd: ''${name}() { ${cmd} -H ${host} --target-host ${command} --diff never "$@"; }'' + name: cmd: ''${name}() { ${cmd} -H ${host} --target-host ${command} --diff never "$@" && keep; }'' ) aliases} "$@" From 610f6e61b3f7a8b103336048fd5c72216714cd0f Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:25:23 -0500 Subject: [PATCH 12/70] add kooha to mobile --- modules/mobile/phone.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/mobile/phone.nix b/modules/mobile/phone.nix index 139727f..499d1bf 100644 --- a/modules/mobile/phone.nix +++ b/modules/mobile/phone.nix @@ -7,6 +7,7 @@ environment.systemPackages = with pkgs; [ chatty + kooha ]; nixpkgs.config.permittedInsecurePackages = [ From 659ede858e78a0f26309a96b57e66844896cb890 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:28:48 -0500 Subject: [PATCH 13/70] dont let any windows float --- modules/mobile/niri.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 71b65a1..22e34c5 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -95,6 +95,10 @@ in workspace-switch { off; } } + window-rule { + open-floating false + } + layer-rule { match namespace="^app-grid$" place-within-backdrop true From b72436594732eb094d23c737c2cb8c53fbb5261d Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:29:40 -0500 Subject: [PATCH 14/70] rm kooha --- modules/mobile/phone.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/mobile/phone.nix b/modules/mobile/phone.nix index 499d1bf..139727f 100644 --- a/modules/mobile/phone.nix +++ b/modules/mobile/phone.nix @@ -7,7 +7,6 @@ environment.systemPackages = with pkgs; [ chatty - kooha ]; nixpkgs.config.permittedInsecurePackages = [ From 1e3178314b52fbf976a3d513d684db9ebf4b960e Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 20:57:39 -0500 Subject: [PATCH 15/70] write logs more often on phone --- modules/mobile/phone.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/mobile/phone.nix b/modules/mobile/phone.nix index 139727f..80f0a50 100644 --- a/modules/mobile/phone.nix +++ b/modules/mobile/phone.nix @@ -15,7 +15,11 @@ networking.modemmanager.enable = true; - services.geoclue2.enable = true; + services = { + # Write logs out often, so a crash can be found. + journald.settings.Journal.SyncIntervalSec = "15s"; + geoclue2.enable = true; + }; users.users.geoclue.extraGroups = [ "networkmanager" ]; location.provider = "geoclue2"; } From 2427d2eaca1f41acb628b7dd0324e5cca3540b9b Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 21:04:27 -0500 Subject: [PATCH 16/70] use app-grid overlay --- flake.lock | 14 +++++++++----- flake.nix | 2 +- modules/mobile/niri.nix | 6 +++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 133e043..8a5624d 100644 --- a/flake.lock +++ b/flake.lock @@ -75,13 +75,17 @@ } }, "app-grid": { - "flake": false, + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1794877575, - "narHash": "sha256-X6NYOOVCLq2R01SsEhrwbBuxfpVGWN1dwK0pNShe8iY=", + "lastModified": 1794880757, + "narHash": "sha256-9UNy7aMPH1q9D3B6hQuRenh7Gf+dWsMp/+vpS56ZCbk=", "ref": "refs/heads/main", - "rev": "f7bd700f1d1a6f21138b6e3ad4aff7feda37dfd8", - "revCount": 2, + "rev": "9f9acae35bd9908c5f1e836521ee8e556464f301", + "revCount": 3, "type": "git", "url": "file:///home/quadradical/Documents/Code/app-grid" }, diff --git a/flake.nix b/flake.nix index a5785f3..2622288 100755 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ }; app-grid = { url = "git+file:///home/quadradical/Documents/Code/app-grid"; - flake = false; + inputs.nixpkgs.follows = "nixpkgs"; }; niri-mobile = { url = "git+file:///home/quadradical/Documents/Code/niri?ref=quad/mobile-testing&shallow=1"; diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 22e34c5..dec6d5d 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -19,8 +19,6 @@ let }; }); - grid = pkgs.callPackage "${inputs.app-grid}/package.nix" { }; - swayosdStyle = pkgs.writeText "swayosd.css" '' @import url("file://${pkgs.swayosd}/etc/xdg/swayosd/style.css"); @@ -52,6 +50,8 @@ let ''; in { + nixpkgs.overlays = [ inputs.app-grid.overlays.default ]; + programs.niri = { enable = true; package = niri; @@ -117,7 +117,7 @@ in } spawn-at-startup "${lib.getExe pkgs.swaybg}" "-i" "${../../background.jpg}" "-m" "fill" - spawn-at-startup "${lib.getExe grid}" + spawn-at-startup "${lib.getExe pkgs.app-grid}" spawn-at-startup "${lib.getExe stevia}" spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" // We log in automatically, so lock straight away. From 0ae2f07b21ee9a11a6b685cb03f63e7915f151a9 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 21:12:39 -0500 Subject: [PATCH 17/70] use remote app-grid --- flake.lock | 12 ++++++------ flake.nix | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 8a5624d..0e09803 100644 --- a/flake.lock +++ b/flake.lock @@ -81,17 +81,17 @@ ] }, "locked": { - "lastModified": 1794880757, - "narHash": "sha256-9UNy7aMPH1q9D3B6hQuRenh7Gf+dWsMp/+vpS56ZCbk=", + "lastModified": 1794881144, + "narHash": "sha256-itsx2UuU5p4bjA5ikoN7u1kUe7EGOKWPE4vVhV2RbHs=", "ref": "refs/heads/main", - "rev": "9f9acae35bd9908c5f1e836521ee8e556464f301", - "revCount": 3, + "rev": "d6ebb048f8d1bc10662f017d3ec42dbb23dffe1a", + "revCount": 2, "type": "git", - "url": "file:///home/quadradical/Documents/Code/app-grid" + "url": "https://git.federated.nexus/Henry-Hiles/app-grid" }, "original": { "type": "git", - "url": "file:///home/quadradical/Documents/Code/app-grid" + "url": "https://git.federated.nexus/Henry-Hiles/app-grid" } }, "base16": { diff --git a/flake.nix b/flake.nix index 2622288..ddd7c99 100755 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ flake = false; }; app-grid = { - url = "git+file:///home/quadradical/Documents/Code/app-grid"; + url = "git+https://git.federated.nexus/Henry-Hiles/app-grid"; inputs.nixpkgs.follows = "nixpkgs"; }; niri-mobile = { From 160a8f065ed06fe44e2d6b4e632a739b290f4973 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 21:21:49 -0500 Subject: [PATCH 18/70] make wl-clip-persist on all graphical systems --- modules/desktop/wm/clipboard.nix | 6 ------ modules/graphical/clipboard.nix | 12 ++++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) delete mode 100644 modules/desktop/wm/clipboard.nix create mode 100644 modules/graphical/clipboard.nix diff --git a/modules/desktop/wm/clipboard.nix b/modules/desktop/wm/clipboard.nix deleted file mode 100644 index 5c60a70..0000000 --- a/modules/desktop/wm/clipboard.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, lib, ... }: -{ - # Keeps clipboard contents available after the app they were copied from exits - programs.fht-compositor.sessionPrograms.wl-clip-persist = - "${lib.getExe pkgs.wl-clip-persist} --clipboard regular"; -} diff --git a/modules/graphical/clipboard.nix b/modules/graphical/clipboard.nix new file mode 100644 index 0000000..b3d1ace --- /dev/null +++ b/modules/graphical/clipboard.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: +{ + systemd.user.services.wl-clip-persist = { + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + ExecStart = "${lib.getExe pkgs.wl-clip-persist} --clipboard regular"; + Restart = "on-failure"; + }; + }; +} From 8f811019b9d00efd9f867e37ab5a546d06b4d1aa Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 21:39:55 -0500 Subject: [PATCH 19/70] bump niri --- flake.lock | 9 ++++----- flake.nix | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 0e09803..ec38546 100644 --- a/flake.lock +++ b/flake.lock @@ -955,16 +955,15 @@ "niri-mobile": { "flake": false, "locked": { - "lastModified": 1794875336, - "narHash": "sha256-7Ot6o5bgixBruntwsQcoNX2ASukgxLzQS9fzCSCuSOw=", - "ref": "quad/mobile-testing", - "rev": "27655fe6b05909051effae07b5440a320b56da0e", + "lastModified": 1794883083, + "narHash": "sha256-SDiMSM/iL1m18WpPQCdKLS1dukFky7yLm00HMQMxBtc=", + "ref": "refs/heads/quad/mobile", + "rev": "3040ae4886514f49ff1bced0ba887b102990fdc5", "shallow": true, "type": "git", "url": "file:///home/quadradical/Documents/Code/niri" }, "original": { - "ref": "quad/mobile-testing", "shallow": true, "type": "git", "url": "file:///home/quadradical/Documents/Code/niri" diff --git a/flake.nix b/flake.nix index ddd7c99..fe285be 100755 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; niri-mobile = { - url = "git+file:///home/quadradical/Documents/Code/niri?ref=quad/mobile-testing&shallow=1"; + url = "git+file:///home/quadradical/Documents/Code/niri?shallow=1"; flake = false; }; nixphone = { From e96169744c30f7cc999b8f2db98f9e4dbe812342 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 23:27:02 -0500 Subject: [PATCH 20/70] use remote niri --- flake.lock | 20 ++++++++++---------- flake.nix | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index ec38546..48a2714 100644 --- a/flake.lock +++ b/flake.lock @@ -955,18 +955,18 @@ "niri-mobile": { "flake": false, "locked": { - "lastModified": 1794883083, - "narHash": "sha256-SDiMSM/iL1m18WpPQCdKLS1dukFky7yLm00HMQMxBtc=", - "ref": "refs/heads/quad/mobile", - "rev": "3040ae4886514f49ff1bced0ba887b102990fdc5", - "shallow": true, - "type": "git", - "url": "file:///home/quadradical/Documents/Code/niri" + "lastModified": 1794889107, + "narHash": "sha256-tvHafWVnTFoIvD47mawvUkloNuweG92yf94ysgDPvok=", + "owner": "Henry-Hiles", + "repo": "niri", + "rev": "09cbacc42dc28062c0fc539a674f356d52eb662b", + "type": "github" }, "original": { - "shallow": true, - "type": "git", - "url": "file:///home/quadradical/Documents/Code/niri" + "owner": "Henry-Hiles", + "ref": "quad/mobile", + "repo": "niri", + "type": "github" } }, "nix-github-actions": { diff --git a/flake.nix b/flake.nix index fe285be..3445607 100755 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; niri-mobile = { - url = "git+file:///home/quadradical/Documents/Code/niri?shallow=1"; + url = "github:Henry-Hiles/niri/quad/mobile"; flake = false; }; nixphone = { From cf92170b72fc8d5734448833f51c324ccbd7e3a2 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 23:36:08 -0500 Subject: [PATCH 21/70] use niri flake --- flake.lock | 12 ++++++++---- flake.nix | 2 +- modules/mobile/niri.nix | 25 ++++++------------------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 48a2714..394c0d2 100644 --- a/flake.lock +++ b/flake.lock @@ -953,13 +953,17 @@ } }, "niri-mobile": { - "flake": false, + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1794889107, - "narHash": "sha256-tvHafWVnTFoIvD47mawvUkloNuweG92yf94ysgDPvok=", + "lastModified": 1794889881, + "narHash": "sha256-ZI7YfIbZbC7e2hQHQSWzOma6npDAvwTgNIFUC6lS8+8=", "owner": "Henry-Hiles", "repo": "niri", - "rev": "09cbacc42dc28062c0fc539a674f356d52eb662b", + "rev": "82e7e8e1d40e21f250dc0e9cf24a441476c32718", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3445607..d5dbbe0 100755 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ }; niri-mobile = { url = "github:Henry-Hiles/niri/quad/mobile"; - flake = false; + inputs.nixpkgs.follows = "nixpkgs"; }; nixphone = { url = "git+https://codeberg.org/nixphone/nixphone"; diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index dec6d5d..b19231d 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -6,19 +6,6 @@ ... }: let - src = inputs.niri-mobile; - - niri = pkgs.niri.overrideAttrs (old: { - inherit src; - cargoDeps = pkgs.rustPlatform.importCargoLock { - lockFile = "${src}/Cargo.lock"; - allowBuiltinFetchGit = true; - }; - env = old.env // { - NIRI_BUILD_COMMIT = "quad-mobile-${src.shortRev}"; - }; - }); - swayosdStyle = pkgs.writeText "swayosd.css" '' @import url("file://${pkgs.swayosd}/etc/xdg/swayosd/style.css"); @@ -50,12 +37,12 @@ let ''; in { - nixpkgs.overlays = [ inputs.app-grid.overlays.default ]; + nixpkgs.overlays = [ + inputs.niri-mobile.overlays.default + inputs.app-grid.overlays.default + ]; - programs.niri = { - enable = true; - package = niri; - }; + programs.niri.enable = true; environment.etc."niri/config.kdl".text = '' output "DSI-1" { @@ -130,7 +117,7 @@ in } ''; - quad.session = lib.getExe' niri "niri-session"; + quad.session = lib.getExe' pkgs.niri "niri-session"; services.logind.settings.Login = { HandlePowerKey = "ignore"; From 7baee200fbbd56569876ae57c4e057a1458ed880 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 23:53:11 -0500 Subject: [PATCH 22/70] use remote stevia --- flake.lock | 18 ++++++++++ flake.nix | 4 +++ modules/mobile/niri.nix | 17 ++++++--- .../mobile/stevia-optional-device-state.patch | 22 ------------ modules/mobile/stevia-reshow-on-tap.patch | 35 ------------------- 5 files changed, 34 insertions(+), 62 deletions(-) delete mode 100644 modules/mobile/stevia-optional-device-state.patch delete mode 100644 modules/mobile/stevia-reshow-on-tap.patch diff --git a/flake.lock b/flake.lock index 394c0d2..877eff4 100644 --- a/flake.lock +++ b/flake.lock @@ -1253,6 +1253,7 @@ "run0-sudo-shim": "run0-sudo-shim", "sable": "sable", "sable-next": "sable-next", + "stevia-mobile": "stevia-mobile", "stylix": "stylix", "wrapper-manager": "wrapper-manager" } @@ -1374,6 +1375,23 @@ "url": "https://git.sable.moe/SableClient/sable-next" } }, + "stevia-mobile": { + "flake": false, + "locked": { + "lastModified": 1794890246, + "narHash": "sha256-l/7hLzzMnjCiy2M5pPrCbHS1qOIYv9Q+D7rS+y8K4xQ=", + "ref": "quad/mobile", + "rev": "6008f299dd78270e132dbb26f64adfa3c53885e3", + "revCount": 1348, + "type": "git", + "url": "https://gitlab.gnome.org/Henry-Hiles/stevia" + }, + "original": { + "ref": "quad/mobile", + "type": "git", + "url": "https://gitlab.gnome.org/Henry-Hiles/stevia" + } + }, "stylix": { "inputs": { "base16": "base16", diff --git a/flake.nix b/flake.nix index d5dbbe0..4bfc9f3 100755 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,10 @@ url = "github:Henry-Hiles/niri/quad/mobile"; inputs.nixpkgs.follows = "nixpkgs"; }; + stevia-mobile = { + url = "git+https://gitlab.gnome.org/Henry-Hiles/stevia?ref=quad/mobile"; + flake = false; + }; nixphone = { url = "git+https://codeberg.org/nixphone/nixphone"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index b19231d..b8046a7 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -17,11 +17,18 @@ let swayosd-client = lib.getExe' pkgs.swayosd "swayosd-client"; stevia = pkgs.stevia.overrideAttrs (old: { - patches = (old.patches or [ ]) ++ [ - # Stevia normally needs a phoc-only protocol to start. - ./stevia-optional-device-state.patch - # Bring back stevia on textfield re-focus - ./stevia-reshow-on-tap.patch + version = "quad-mobile-${inputs.stevia-mobile.shortRev}"; + src = inputs.stevia-mobile; + # Needed by newer Stevia than nixpkgs has + buildInputs = old.buildInputs ++ [ + pkgs.gsettings-desktop-schemas + pkgs.gst_all_1.gstreamer + pkgs.gst_all_1.gst-plugins-base + pkgs.libsoup_3 + ]; + mesonFlags = old.mesonFlags ++ [ + "-Duim=disabled" + "-Dgovarnam=disabled" ]; }); diff --git a/modules/mobile/stevia-optional-device-state.patch b/modules/mobile/stevia-optional-device-state.patch deleted file mode 100644 index b0cbbcb..0000000 --- a/modules/mobile/stevia-optional-device-state.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/pos-hw-tracker.c -+++ b/src/pos-hw-tracker.c -@@ -72,7 +72,9 @@ - gpointer device_state) - { - self->device_state = device_state; -- zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self); -+ /* Only phoc has the device state protocol. Without it, assume there is no hardware keyboard. */ -+ if (self->device_state) -+ zphoc_device_state_v1_add_listener (self->device_state, &device_state_listener, self); - } - - ---- a/src/pos-wayland.c -+++ b/src/pos-wayland.c -@@ -387,6 +387,5 @@ - self->zwlr_foreign_toplevel_manager_v1 && - self->layer_shell && - self->zxdg_output_manager_v1 && -- self->zphoc_device_state_v1 && - self->wlr_data_control_manager); - } diff --git a/modules/mobile/stevia-reshow-on-tap.patch b/modules/mobile/stevia-reshow-on-tap.patch deleted file mode 100644 index 3f6f7de..0000000 --- a/modules/mobile/stevia-reshow-on-tap.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/src/pos-input-method.c -+++ b/src/pos-input-method.c -@@ -62,6 +62,8 @@ - PosImState *submitted; - - guint serial; -+ /* Activated again while already active, e.g. after tapping a focused text field. */ -+ gboolean reactivated; - }; - G_DEFINE_TYPE (PosInputMethod, pos_input_method, G_TYPE_OBJECT) - -@@ -93,8 +95,11 @@ - - g_debug ("%s", __func__); - -- if (self->pending->active == TRUE) -+ /* Let the keyboard show itself again if it was hidden by the user. */ -+ if (self->pending->active == TRUE) { -+ self->reactivated = TRUE; - return; -+ } - - self->pending->active = TRUE; - g_clear_pointer (&self->pending->surrounding_text, g_free); -@@ -194,8 +199,9 @@ - - self->submitted = pos_im_state_dup (self->pending); - -- if (current->active != self->submitted->active) -+ if (current->active != self->submitted->active || self->reactivated) - g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACTIVE]); -+ self->reactivated = FALSE; - - if (g_strcmp0 (current->surrounding_text, self->submitted->surrounding_text) || - current->cursor != self->submitted->cursor || From fc667a38a87cdb9af15fba47bd90e85c871e88c3 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 23:57:22 -0500 Subject: [PATCH 23/70] add overskride to graphical packages --- modules/graphical/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/graphical/packages.nix b/modules/graphical/packages.nix index 4379ab2..afa2af9 100644 --- a/modules/graphical/packages.nix +++ b/modules/graphical/packages.nix @@ -9,6 +9,7 @@ showtime resources nmgui + overskride wl-clipboard google-cursor papirus-icon-theme From 123e37f4625b701d56f9f2a9556cf1236a941c9c Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 00:09:48 -0500 Subject: [PATCH 24/70] replace overskride with adw-bluetooth --- modules/graphical/packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/graphical/packages.nix b/modules/graphical/packages.nix index afa2af9..477617f 100644 --- a/modules/graphical/packages.nix +++ b/modules/graphical/packages.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { services.xserver.excludePackages = [ pkgs.xterm ]; + services.adw-bluetooth.enable = true; environment.systemPackages = with pkgs; [ tuba gradia @@ -9,7 +10,6 @@ showtime resources nmgui - overskride wl-clipboard google-cursor papirus-icon-theme From eca3c70d93f3dc283b223a6fb0bdb9119d99b86b Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 00:13:12 -0500 Subject: [PATCH 25/70] bump app-grid --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 877eff4..52cb2cd 100644 --- a/flake.lock +++ b/flake.lock @@ -81,11 +81,11 @@ ] }, "locked": { - "lastModified": 1794881144, - "narHash": "sha256-itsx2UuU5p4bjA5ikoN7u1kUe7EGOKWPE4vVhV2RbHs=", + "lastModified": 1794892328, + "narHash": "sha256-9QMpzIs+e2zhK62ErBzi6sHOwKtUM2cAiMOuRVPxbE8=", "ref": "refs/heads/main", - "rev": "d6ebb048f8d1bc10662f017d3ec42dbb23dffe1a", - "revCount": 2, + "rev": "42d273798b72ab517413738c323164382d74b3d3", + "revCount": 3, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/app-grid" }, From 527374059e9ffe803639b29f83856e2c75b48886 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 00:29:59 -0500 Subject: [PATCH 26/70] add librewolf mobile config --- flake.lock | 8 ++-- modules/graphical/librewolf/customChrome.css | 8 ++++ modules/graphical/librewolf/default.nix | 8 +--- modules/mobile/librewolf.nix | 40 ++++++++++++++++++++ 4 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 modules/mobile/librewolf.nix diff --git a/flake.lock b/flake.lock index 52cb2cd..4c1f8c4 100644 --- a/flake.lock +++ b/flake.lock @@ -81,11 +81,11 @@ ] }, "locked": { - "lastModified": 1794892328, - "narHash": "sha256-9QMpzIs+e2zhK62ErBzi6sHOwKtUM2cAiMOuRVPxbE8=", + "lastModified": 1794892850, + "narHash": "sha256-7kOT7EWzzNnKvuuPkTx9HciJ7Kd1ZrUbZJcwKgqq+w0=", "ref": "refs/heads/main", - "rev": "42d273798b72ab517413738c323164382d74b3d3", - "revCount": 3, + "rev": "ab0704e682c8b394edbec55c2b7b83d1601f7da8", + "revCount": 4, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/app-grid" }, diff --git a/modules/graphical/librewolf/customChrome.css b/modules/graphical/librewolf/customChrome.css index 0760c97..2abac59 100644 --- a/modules/graphical/librewolf/customChrome.css +++ b/modules/graphical/librewolf/customChrome.css @@ -134,3 +134,11 @@ --gnome-private-text-primary-color: #fbfbfe; } } + +/* Phone only: quad.mobile is set in modules/mobile/librewolf.nix. The mobile layout turns the URL + * bar results into a sheet over the page, but the theme makes its background transparent. */ +@media -moz-pref("quad.mobile") { + .urlbarView { + background: var(--gnome-menu-background) !important; + } +} diff --git a/modules/graphical/librewolf/default.nix b/modules/graphical/librewolf/default.nix index 94784ba..cc8d4c8 100644 --- a/modules/graphical/librewolf/default.nix +++ b/modules/graphical/librewolf/default.nix @@ -133,6 +133,8 @@ value = { install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${id}/latest.xpi"; installation_mode = "force_installed"; + # In the extensions menu, not as separate toolbar buttons + default_area = "menupanel"; }; }) [ @@ -141,15 +143,9 @@ "sponsorBlocker@ajay.app" "firefox@tampermonkey.net" "firefox-addon@pronoundb.org" - "jid1-MnnxcxisBPnSXQ@jetpack" # Privacy Badger "frankerfacez@frankerfacez.com" - "7esoorv3@alefvanoon.anonaddy.me" # LibRedirect "{de621c74-2aa6-4c91-a2da-28d445b66bab}" # YouTube Livestreams Theater Mode - "{cf3dba12-a848-4f68-8e2d-f9fadc0721de}" # Google Lighthouse "{446900e4-71c2-419f-a6a7-df9c091e268b}" # Bitwarden - "{4ce83447-8255-43c2-b8f7-e02eb8c2cc39}" # Draw on Page - "{ac34afe8-3a2e-4201-b745-346c0cf6ec7d}" # Better Youtube Shorts - "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" # User-Agent Switcher and Manager "enhancerforyoutube@maximerf.addons.mozilla.org" ] ) diff --git a/modules/mobile/librewolf.nix b/modules/mobile/librewolf.nix new file mode 100644 index 0000000..0af0b12 --- /dev/null +++ b/modules/mobile/librewolf.nix @@ -0,0 +1,40 @@ +{ pkgs, ... }: +# The mobile layout from postmarketOS's mobile-config-firefox, the same way nixpkgs' firefox-mobile +# adds it, but on top of the LibreWolf set up in graphical/librewolf. +let + src = pkgs.fetchFromGitLab { + domain = "gitlab.nura.eco"; + owner = "nura"; + repo = "mobile-config-firefox"; + rev = "5.5.1"; + hash = "sha256-kIMeVKUI8/MdCJIkBlcYYEUnN7+ciDpKuReAeKkn8VY="; + }; + + configDir = pkgs.runCommand "mobile-config-firefox" { } '' + mkdir -p $out + cp -r ${src}/src/modules/. $out/ + cp -r ${src}/src/themes $out/ + ''; + + # It logs into /chrome, which is a read-only theme from the store here, and failing to + # open the log stops it from loading at all. Log into the profile itself instead. + autoconfig = pkgs.runCommand "mobile-config-autoconfig.js" { } '' + substitute ${src}/src/mobile-config-autoconfig.js $out \ + --replace-fail "/usr/lib/mobile-config-firefox" "${configDir}" \ + --replace-fail 'var logFile = g_chromeDir.clone();' 'var logFile = Services.dirsvc.get("ProfD", Ci.nsIFile);' + ''; + + # The wrapper sets up autoconfig itself + prefs = pkgs.runCommand "mobile-config-prefs.js" { } '' + grep -v -e general.config.filename -e general.config.obscure_value \ + -e general.config.sandbox_enabled ${src}/src/mobile-config-prefs.js > $out + ''; +in +{ + programs.firefox.autoConfigFiles = [ + autoconfig + prefs + # Lets graphical/librewolf/customChrome.css fix things up for the mobile layout only + (pkgs.writeText "quad-mobile-prefs.js" ''defaultPref("quad.mobile", true);'') + ]; +} From 8bd6b91288b8e81da6a847019125cb81f7501925 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 09:41:41 -0500 Subject: [PATCH 27/70] stop locks racing --- modules/desktop/wm/lockscreen.nix | 7 ++----- modules/graphical/gtklock.nix | 13 ++++++++++++- modules/mobile/niri.nix | 8 ++------ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/desktop/wm/lockscreen.nix b/modules/desktop/wm/lockscreen.nix index ee6b0d4..9b7895e 100644 --- a/modules/desktop/wm/lockscreen.nix +++ b/modules/desktop/wm/lockscreen.nix @@ -4,19 +4,16 @@ lib, ... }: -let - lock = "pidof gtklock || ${lib.getExe config.programs.gtklock.package}"; -in { services.logind.settings.Login.HandlePowerKey = "suspend"; programs.fht-compositor = { # We log in automatically, so lock straight away. - settings.autostart = [ lock ]; + settings.autostart = [ "${config.quad.lock}" ]; sessionPrograms.hypridle = "${lib.getExe pkgs.hypridle} --config ${pkgs.writeText "hypridle.conf" '' general { - lock_cmd = ${lock} + lock_cmd = ${config.quad.lock} before_sleep_cmd = loginctl lock-session } ''}"; diff --git a/modules/graphical/gtklock.nix b/modules/graphical/gtklock.nix index 6af55e2..29df52d 100644 --- a/modules/graphical/gtklock.nix +++ b/modules/graphical/gtklock.nix @@ -1,5 +1,6 @@ { config, + lib, pkgs, ... }: @@ -129,7 +130,17 @@ let ''; in { - programs.gtklock = { + options.quad.lock = lib.mkOption { + type = lib.types.package; + readOnly = true; + description = "Locks the session with gtklock, unless it's already running."; + default = pkgs.writeShellScript "lock" '' + exec ${lib.getExe' pkgs.util-linux "flock"} --nonblock "$XDG_RUNTIME_DIR/gtklock.lock" \ + ${lib.getExe config.programs.gtklock.package} + ''; + }; + + config.programs.gtklock = { enable = true; config.main = { diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index b8046a7..6c4694c 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -32,13 +32,9 @@ let ]; }); - lock = pkgs.writeShellScript "lock" '' - ${lib.getExe' pkgs.procps "pidof"} gtklock || exec ${lib.getExe config.programs.gtklock.package} - ''; - hypridleConfig = pkgs.writeText "hypridle.conf" '' general { - lock_cmd = ${lock} + lock_cmd = ${config.quad.lock} before_sleep_cmd = loginctl lock-session } ''; @@ -115,7 +111,7 @@ in spawn-at-startup "${lib.getExe stevia}" spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" // We log in automatically, so lock straight away. - spawn-at-startup "${lock}" + spawn-at-startup "${config.quad.lock}" spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}" binds { From 1971a05281bcca0b3f8de747f52e5652858d3f9f Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 09:56:50 -0500 Subject: [PATCH 28/70] add gtklock logging --- modules/graphical/gtklock.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/graphical/gtklock.nix b/modules/graphical/gtklock.nix index 29df52d..c9fefd4 100644 --- a/modules/graphical/gtklock.nix +++ b/modules/graphical/gtklock.nix @@ -136,6 +136,7 @@ in description = "Locks the session with gtklock, unless it's already running."; default = pkgs.writeShellScript "lock" '' exec ${lib.getExe' pkgs.util-linux "flock"} --nonblock "$XDG_RUNTIME_DIR/gtklock.lock" \ + ${lib.getExe' config.systemd.package "systemd-cat"} --identifier=gtklock \ ${lib.getExe config.programs.gtklock.package} ''; }; From 895072004088a24776258d35c7a98131c5795e0c Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 11:37:32 -0500 Subject: [PATCH 29/70] hide close button on mobile --- modules/mobile/niri.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 6c4694c..d5f7001 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -132,7 +132,8 @@ in unset GTK_IM_MODULE QT_IM_MODULE XMODIFIERS ''; - # The on-screen keyboard only shows itself with this on. - users.users.quadradical.maid.gsettings.settings.org.gnome.desktop.a11y.applications.screen-keyboard-enabled = - true; + users.users.quadradical.maid.gsettings.settings.org.gnome.desktop = { + a11y.applications.screen-keyboard-enabled = true; + wm.preferences.button-layout = "appmenu:"; + }; } From 554fdffd6a426a8d79df848156d91e3cdbd5dbf7 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 12:00:32 -0500 Subject: [PATCH 30/70] fixup gtklock layout, fade to black before suspend --- modules/graphical/gtklock.nix | 198 +++++++++++++++++++--------------- modules/mobile/niri.nix | 8 ++ 2 files changed, 120 insertions(+), 86 deletions(-) diff --git a/modules/graphical/gtklock.nix b/modules/graphical/gtklock.nix index c9fefd4..ce08c25 100644 --- a/modules/graphical/gtklock.nix +++ b/modules/graphical/gtklock.nix @@ -16,110 +16,131 @@ let layout = pkgs.writeText "gtklock.ui" '' - + window-box - center - center - vertical + + external + never - - info-box - vertical + + none - - time-box + + content-box + center + center vertical - - clock-label - - - - - date-label - - - - - - - - - none - - - center - 8 - - - 1 - - - - - input-field - 300 - 0.5 - 0 - 0 - password - Input Password - - - - 0 - - - - - none - 1 + + info-box + vertical - - never - 256 - 1 + + time-box + vertical - - - - vertical - 1 - - + + clock-label + + + + + date-label - - 1 - - - center - 8 + + none - - warning-label - - - - - error-label - - - - - 1 - + + center + 8 + + + 1 + + + + + input-field + 300 + 0.5 + 0 + 0 + password + Input Password + + + + 0 + 0 + + + + + none + 1 + + + never + 256 + 1 + + + + + vertical + 1 + + + + + + + + + 0 + 1 + + + + + center + vertical + + + error-label + 1 + center + + + + + warning-label + 1 + center + + + + + 1 + + + + + + 0 + 2 + + - - 2 - @@ -157,6 +178,11 @@ in background-position: center; } + #window-box, + #window-box viewport { + background: none; + } + #clock-label { font-size: 96pt; color: white; diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index d5f7001..ea9fb42 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -38,6 +38,11 @@ let before_sleep_cmd = loginctl lock-session } ''; + + suspend = pkgs.writeShellScript "suspend" '' + ${lib.getExe pkgs.niri} msg action power-off-monitors + exec ${config.systemd.package}/bin/systemctl suspend + ''; in { nixpkgs.overlays = [ @@ -54,6 +59,8 @@ in input { touch { edge-swipe-size 24; } + // The power key is bound below instead. + disable-power-key-handling } layout { @@ -115,6 +122,7 @@ in spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}" binds { + XF86PowerOff allow-when-locked=true { spawn "${suspend}"; } XF86AudioRaiseVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "raise"; } XF86AudioLowerVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "lower"; } } From 9922176f176cb50f73a1f38e2c1299f9d177e024 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 12:30:57 -0500 Subject: [PATCH 31/70] add swaync config for mobile --- modules/mobile/niri.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index ea9fb42..92958a5 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -43,6 +43,44 @@ let ${lib.getExe pkgs.niri} msg action power-off-monitors exec ${config.systemd.package}/bin/systemctl suspend ''; + + swaync = pkgs.swaynotificationcenter; + + swayncStyle = pkgs.writeText "swaync.css" '' + @import url("file://${swaync}/etc/xdg/swaync/style.css"); + + :root { + --noti-bg-focus: transparent; + --noti-border-color: transparent; + --notification-shadow: none; + --border-radius: 16px; + --notification-icon-size: 48px; + --font-size-summary: 14px; + --font-size-body: 14px; + } + + .notification-row .notification-background .notification { + background: shade(@theme_bg_color, 1.25); + } + + .notification-row .notification-background .notification .notification-default-action .notification-content { + padding: 6px; + } + + .notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body { + opacity: 0.8; + } + ''; + + swayncConfig = (pkgs.formats.json { }).generate "swaync.json" ( + lib.importJSON "${swaync}/etc/xdg/swaync/config.json" + // { + positionX = "center"; + positionY = "top"; + notification-window-width = 344; + ignore-gtk-theme = false; + } + ); in { nixpkgs.overlays = [ @@ -117,6 +155,7 @@ in spawn-at-startup "${lib.getExe pkgs.app-grid}" spawn-at-startup "${lib.getExe stevia}" spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" + spawn-at-startup "${lib.getExe' swaync "swaync"}" "--style" "${swayncStyle}" "--config" "${swayncConfig}" // We log in automatically, so lock straight away. spawn-at-startup "${config.quad.lock}" spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}" From cbe2aaa294eb7ca53d10a6e26f521561c93f579d Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 12:53:12 -0500 Subject: [PATCH 32/70] update librewolf config to use XDG dirs --- modules/graphical/librewolf/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/graphical/librewolf/default.nix b/modules/graphical/librewolf/default.nix index cc8d4c8..5e09b73 100644 --- a/modules/graphical/librewolf/default.nix +++ b/modules/graphical/librewolf/default.nix @@ -9,8 +9,8 @@ environment.etc."librewolf/policies/policies.json".source = config.environment.etc."firefox/policies/policies.json".source; - users.users.quadradical.maid.file.home = { - ".librewolf/profiles.ini".source = (pkgs.formats.ini { }).generate "profiles.ini" { + users.users.quadradical.maid.file.xdg_config = { + "librewolf/librewolf/profiles.ini".source = (pkgs.formats.ini { }).generate "profiles.ini" { General = { StartWithLastProfile = 1; }; @@ -22,7 +22,7 @@ }; }; - ".librewolf/quadradical/chrome".source = toString ( + "librewolf/librewolf/quadradical/chrome".source = toString ( pkgs.symlinkJoin { name = "firefox-gnome-theme"; paths = [ From 6e13a0f258cc3a3d3132145eb031024e10ecb8af Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 12:53:48 -0500 Subject: [PATCH 33/70] fix vscodium config --- modules/desktop/vscodium.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/desktop/vscodium.nix b/modules/desktop/vscodium.nix index b219d71..fd121c3 100644 --- a/modules/desktop/vscodium.nix +++ b/modules/desktop/vscodium.nix @@ -106,7 +106,7 @@ "workbench.colorTheme" = "Nord"; }; - "/home/quadradical/.config/VSCodium/User/keybindings.json".source = builtins.toJSON [ + "VSCodium/User/keybindings.json".text = builtins.toJSON [ { key = "ctrl+s"; command = "workbench.action.files.saveAll"; From 8e3a9bcc7538beb4f40dd2c57109442ec184b893 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 13:03:58 -0500 Subject: [PATCH 34/70] clean up librewolf config --- modules/graphical/librewolf/default.nix | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/graphical/librewolf/default.nix b/modules/graphical/librewolf/default.nix index 5e09b73..67ea1c2 100644 --- a/modules/graphical/librewolf/default.nix +++ b/modules/graphical/librewolf/default.nix @@ -51,8 +51,25 @@ "widget.use-xdg-desktop-portal.file-picker" = 1; "toolkit.legacyUserProfileCustomizations.stylesheets" = true; "privacy.fingerprintingProtection.overrides" = "+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC"; - "browser.uiCustomization.state" = - "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19}"; + "browser.download.autohideButton" = true; + "browser.uiCustomization.state" = builtins.toJSON { + currentVersion = 28; + placements = { + nav-bar = [ + "back-button" + "forward-button" + "stop-reload-button" + "urlbar-container" + "downloads-button" + "unified-extensions-button" + ]; + TabsToolbar = [ + "tabbrowser-tabs" + "new-tab-button" + "alltabs-button" + ]; + }; + }; } ); From ba277234a82ef5aa3f0f2e1c90376c672e6b6f44 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 14:48:45 -0500 Subject: [PATCH 35/70] fixup librewolf mobile --- modules/mobile/librewolf.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/mobile/librewolf.nix b/modules/mobile/librewolf.nix index 0af0b12..743c6a6 100644 --- a/modules/mobile/librewolf.nix +++ b/modules/mobile/librewolf.nix @@ -16,12 +16,11 @@ let cp -r ${src}/src/themes $out/ ''; - # It logs into /chrome, which is a read-only theme from the store here, and failing to - # open the log stops it from loading at all. Log into the profile itself instead. autoconfig = pkgs.runCommand "mobile-config-autoconfig.js" { } '' - substitute ${src}/src/mobile-config-autoconfig.js $out \ + substitute ${src}/src/mobile-config-autoconfig.js autoconfig.js \ --replace-fail "/usr/lib/mobile-config-firefox" "${configDir}" \ --replace-fail 'var logFile = g_chromeDir.clone();' 'var logFile = Services.dirsvc.get("ProfD", Ci.nsIFile);' + { echo '(function () {'; cat autoconfig.js; echo '})();'; } > $out ''; # The wrapper sets up autoconfig itself From eb322742edbb04000a825e49529f05df69069190 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 15:07:51 -0500 Subject: [PATCH 36/70] hide overflow list for librewolf --- modules/graphical/librewolf/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/graphical/librewolf/default.nix b/modules/graphical/librewolf/default.nix index 67ea1c2..2cf5d59 100644 --- a/modules/graphical/librewolf/default.nix +++ b/modules/graphical/librewolf/default.nix @@ -55,6 +55,7 @@ "browser.uiCustomization.state" = builtins.toJSON { currentVersion = 28; placements = { + widget-overflow-fixed-list = [ ]; nav-bar = [ "back-button" "forward-button" From 442a8071a1d6ab48072adc26c733693d7479800a Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 16:48:50 -0500 Subject: [PATCH 37/70] bump stevia --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 4c1f8c4..c3a167f 100644 --- a/flake.lock +++ b/flake.lock @@ -1378,10 +1378,10 @@ "stevia-mobile": { "flake": false, "locked": { - "lastModified": 1794890246, - "narHash": "sha256-l/7hLzzMnjCiy2M5pPrCbHS1qOIYv9Q+D7rS+y8K4xQ=", + "lastModified": 1794931711, + "narHash": "sha256-o77hyGwV3ipquHABWk0zAP3QniiORpi3WmdQ26Dp1pg=", "ref": "quad/mobile", - "rev": "6008f299dd78270e132dbb26f64adfa3c53885e3", + "rev": "40ed1ab05b5b81cdabb76a959c4fc681fd216d3b", "revCount": 1348, "type": "git", "url": "https://gitlab.gnome.org/Henry-Hiles/stevia" From e912fd156bd19607eefb6e47ecbc0d1622ce142c Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 16:53:26 -0500 Subject: [PATCH 38/70] add quadshell --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++++ modules/mobile/quadshell.nix | 16 ++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 modules/mobile/quadshell.nix diff --git a/flake.lock b/flake.lock index c3a167f..bcaabb4 100644 --- a/flake.lock +++ b/flake.lock @@ -1227,6 +1227,26 @@ "type": "github" } }, + "quadshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1794952294, + "narHash": "sha256-vRU0fxynA0W6KnH4eN4wp0FP1YWtU9jDhamrfNX7T3I=", + "ref": "refs/heads/main", + "rev": "7f2794a630be74129ea6a4e9717d97378d1224ee", + "revCount": 1, + "type": "git", + "url": "https://git.federated.nexus/Henry-Hiles/quadshell" + }, + "original": { + "type": "git", + "url": "https://git.federated.nexus/Henry-Hiles/quadshell" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -1250,6 +1270,7 @@ "nix-maid": "nix-maid", "nixphone": "nixphone", "nixpkgs": "nixpkgs", + "quadshell": "quadshell", "run0-sudo-shim": "run0-sudo-shim", "sable": "sable", "sable-next": "sable-next", diff --git a/flake.nix b/flake.nix index 4bfc9f3..0d6477c 100755 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,10 @@ url = "git+https://git.federated.nexus/Henry-Hiles/app-grid"; inputs.nixpkgs.follows = "nixpkgs"; }; + quadshell = { + url = "git+https://git.federated.nexus/Henry-Hiles/quadshell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; niri-mobile = { url = "github:Henry-Hiles/niri/quad/mobile"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/mobile/quadshell.nix b/modules/mobile/quadshell.nix new file mode 100644 index 0000000..b22795e --- /dev/null +++ b/modules/mobile/quadshell.nix @@ -0,0 +1,16 @@ +{ + lib, + pkgs, + inputs, + ... +}: +{ + nixpkgs.overlays = [ inputs.quadshell.overlays.default ]; + + # The flashlight LED's brightness is writable by this group + users.users.quadradical.extraGroups = [ "feedbackd" ]; + + environment.etc."niri/config.kdl".text = '' + spawn-at-startup "${lib.getExe pkgs.quadshell}" + ''; +} From 03f2c9f500661e7c88c5b4f84295cc874ae3aae6 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 18:17:05 -0500 Subject: [PATCH 39/70] add qml extension --- modules/desktop/vscodium.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/desktop/vscodium.nix b/modules/desktop/vscodium.nix index fd121c3..8dc633c 100644 --- a/modules/desktop/vscodium.nix +++ b/modules/desktop/vscodium.nix @@ -37,6 +37,18 @@ version = "0.2.1"; sha256 = "sha256-uHdQeW9ZXYg6+VnD6cb5CU10/xV5hCtxt5K+j0qb7as="; } + { + publisher = "theqtcompany"; + name = "qt-core"; + version = "1.16.0"; + hash = "sha256-6NBWsK7ljx7Ie3xvOrjBClyvwQP1UltCna1jQHJST5U="; + } + { + publisher = "theqtcompany"; + name = "qt-qml"; + version = "1.16.0"; + hash = "sha256-QWjUSbBtHIdxYZyRBDn64HXhvSwhgzm7DjDaed6lNds="; + } ]; }) ]; From e48297d2bad1881c69755ae2f02f3aa06422ce70 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 18:20:45 -0500 Subject: [PATCH 40/70] add qml settings --- modules/desktop/vscodium.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/desktop/vscodium.nix b/modules/desktop/vscodium.nix index 8dc633c..e089c56 100644 --- a/modules/desktop/vscodium.nix +++ b/modules/desktop/vscodium.nix @@ -116,6 +116,8 @@ "indentRainbow.ignoreErrorLanguages" = [ "*" ]; "dart.runPubGetOnPubspecChanges" = "never"; "workbench.colorTheme" = "Nord"; + "qt-qml.qmlls.customExePath" = "${pkgs.qt6.qtdeclarative}/bin/qmlls"; + "qt-qml.doNotAskForQmllsDownload" = true; }; "VSCodium/User/keybindings.json".text = builtins.toJSON [ From d6728c1c96eebf7351e49f23b0fe3268fe276c23 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 23:12:53 -0500 Subject: [PATCH 41/70] bump to new quadshell --- flake.lock | 8 ++-- modules/{graphical => desktop/wm}/gtklock.nix | 2 +- modules/mobile/niri.nix | 41 ------------------- modules/mobile/phone.nix | 5 --- modules/mobile/quadshell.nix | 7 +++- 5 files changed, 10 insertions(+), 53 deletions(-) rename modules/{graphical => desktop/wm}/gtklock.nix (99%) diff --git a/flake.lock b/flake.lock index bcaabb4..955e643 100644 --- a/flake.lock +++ b/flake.lock @@ -1234,11 +1234,11 @@ ] }, "locked": { - "lastModified": 1794952294, - "narHash": "sha256-vRU0fxynA0W6KnH4eN4wp0FP1YWtU9jDhamrfNX7T3I=", + "lastModified": 1794964664, + "narHash": "sha256-SZAog68A9C0c3ymtmORtOIzm34o3nOhiR7QX06xEmTU=", "ref": "refs/heads/main", - "rev": "7f2794a630be74129ea6a4e9717d97378d1224ee", - "revCount": 1, + "rev": "b5e5ecf2f351806ee2215641ab30ea37d403afa0", + "revCount": 5, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/quadshell" }, diff --git a/modules/graphical/gtklock.nix b/modules/desktop/wm/gtklock.nix similarity index 99% rename from modules/graphical/gtklock.nix rename to modules/desktop/wm/gtklock.nix index ce08c25..85fecab 100644 --- a/modules/graphical/gtklock.nix +++ b/modules/desktop/wm/gtklock.nix @@ -10,7 +10,7 @@ let background = pkgs.runCommand "lock-background.jpg" { nativeBuildInputs = [ pkgs.buildPackages.imagemagick ]; } '' - magick ${../../background.jpg} -resize 50% -blur 0x16 -modulate 80 $out + magick ${../../../background.jpg} -resize 50% -blur 0x16 -modulate 80 $out ''; layout = pkgs.writeText "gtklock.ui" '' diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 92958a5..8b0207d 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -34,7 +34,6 @@ let hypridleConfig = pkgs.writeText "hypridle.conf" '' general { - lock_cmd = ${config.quad.lock} before_sleep_cmd = loginctl lock-session } ''; @@ -44,43 +43,6 @@ let exec ${config.systemd.package}/bin/systemctl suspend ''; - swaync = pkgs.swaynotificationcenter; - - swayncStyle = pkgs.writeText "swaync.css" '' - @import url("file://${swaync}/etc/xdg/swaync/style.css"); - - :root { - --noti-bg-focus: transparent; - --noti-border-color: transparent; - --notification-shadow: none; - --border-radius: 16px; - --notification-icon-size: 48px; - --font-size-summary: 14px; - --font-size-body: 14px; - } - - .notification-row .notification-background .notification { - background: shade(@theme_bg_color, 1.25); - } - - .notification-row .notification-background .notification .notification-default-action .notification-content { - padding: 6px; - } - - .notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body { - opacity: 0.8; - } - ''; - - swayncConfig = (pkgs.formats.json { }).generate "swaync.json" ( - lib.importJSON "${swaync}/etc/xdg/swaync/config.json" - // { - positionX = "center"; - positionY = "top"; - notification-window-width = 344; - ignore-gtk-theme = false; - } - ); in { nixpkgs.overlays = [ @@ -155,9 +117,6 @@ in spawn-at-startup "${lib.getExe pkgs.app-grid}" spawn-at-startup "${lib.getExe stevia}" spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" - spawn-at-startup "${lib.getExe' swaync "swaync"}" "--style" "${swayncStyle}" "--config" "${swayncConfig}" - // We log in automatically, so lock straight away. - spawn-at-startup "${config.quad.lock}" spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}" binds { diff --git a/modules/mobile/phone.nix b/modules/mobile/phone.nix index 80f0a50..951a477 100644 --- a/modules/mobile/phone.nix +++ b/modules/mobile/phone.nix @@ -15,11 +15,6 @@ networking.modemmanager.enable = true; - services = { - # Write logs out often, so a crash can be found. - journald.settings.Journal.SyncIntervalSec = "15s"; - geoclue2.enable = true; - }; users.users.geoclue.extraGroups = [ "networkmanager" ]; location.provider = "geoclue2"; } diff --git a/modules/mobile/quadshell.nix b/modules/mobile/quadshell.nix index b22795e..0b97460 100644 --- a/modules/mobile/quadshell.nix +++ b/modules/mobile/quadshell.nix @@ -7,8 +7,11 @@ { nixpkgs.overlays = [ inputs.quadshell.overlays.default ]; - # The flashlight LED's brightness is writable by this group - users.users.quadradical.extraGroups = [ "feedbackd" ]; + # quadshell is GeoClue's agent, for its location toggle + services.geoclue2 = { + enableDemoAgent = false; + whitelistedAgents = [ "quadshell" ]; + }; environment.etc."niri/config.kdl".text = '' spawn-at-startup "${lib.getExe pkgs.quadshell}" From ac2e68f3353d948c701aca77832ad576140432d3 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 23:32:15 -0500 Subject: [PATCH 42/70] bump quadshell --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 955e643..9290592 100644 --- a/flake.lock +++ b/flake.lock @@ -1234,11 +1234,11 @@ ] }, "locked": { - "lastModified": 1794964664, - "narHash": "sha256-SZAog68A9C0c3ymtmORtOIzm34o3nOhiR7QX06xEmTU=", + "lastModified": 1794976248, + "narHash": "sha256-vv6IgqH+5RKo6IphzOS6Zz93AVBWqRO+0s3sVyyKZDc=", "ref": "refs/heads/main", - "rev": "b5e5ecf2f351806ee2215641ab30ea37d403afa0", - "revCount": 5, + "rev": "518ffa31b4d11580391496464c07ade603f02de7", + "revCount": 6, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/quadshell" }, From 0e4188a00f3862c2d06b79d0f7d2ef4e882d3d98 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 23:36:30 -0500 Subject: [PATCH 43/70] rm g-c-c --- modules/mobile/allow-broken.nix | 1 - modules/mobile/settings.nix | 14 -------------- 2 files changed, 15 deletions(-) delete mode 100644 modules/mobile/allow-broken.nix delete mode 100644 modules/mobile/settings.nix diff --git a/modules/mobile/allow-broken.nix b/modules/mobile/allow-broken.nix deleted file mode 100644 index 0745649..0000000 --- a/modules/mobile/allow-broken.nix +++ /dev/null @@ -1 +0,0 @@ -{ nixpkgs.config.allowBroken = true; } diff --git a/modules/mobile/settings.nix b/modules/mobile/settings.nix deleted file mode 100644 index 197bc5f..0000000 --- a/modules/mobile/settings.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - gnome-control-center - (makeDesktopItem { - name = "settings"; - desktopName = "Settings"; - exec = "env XDG_CURRENT_DESKTOP=GNOME gnome-control-center"; - icon = "org.gnome.Settings"; - startupWMClass = "org.gnome.Settings"; - categories = [ "Settings" ]; - }) - ]; -} From 61494e77cdeee0c51d9395c1b86fb67e434a0403 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 23:39:02 -0500 Subject: [PATCH 44/70] rm some old packages from mobile --- modules/desktop/packages.nix | 2 ++ modules/graphical/packages.nix | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/desktop/packages.nix b/modules/desktop/packages.nix index 6cfa860..6d8e15d 100644 --- a/modules/desktop/packages.nix +++ b/modules/desktop/packages.nix @@ -1,6 +1,8 @@ { pkgs, ... }: { + services.adw-bluetooth.enable = true; environment.systemPackages = with pkgs; [ + nmgui heroic inkscape libreoffice diff --git a/modules/graphical/packages.nix b/modules/graphical/packages.nix index 477617f..913bbc3 100644 --- a/modules/graphical/packages.nix +++ b/modules/graphical/packages.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { services.xserver.excludePackages = [ pkgs.xterm ]; - services.adw-bluetooth.enable = true; environment.systemPackages = with pkgs; [ tuba gradia @@ -9,7 +8,6 @@ gapless showtime resources - nmgui wl-clipboard google-cursor papirus-icon-theme From 0bb5012125af3d5587ddb51eda29713045ae4afc Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 00:11:51 -0500 Subject: [PATCH 45/70] add adw-bluetooth on mobile --- modules/mobile/quadshell.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mobile/quadshell.nix b/modules/mobile/quadshell.nix index 0b97460..fcfc431 100644 --- a/modules/mobile/quadshell.nix +++ b/modules/mobile/quadshell.nix @@ -7,6 +7,9 @@ { nixpkgs.overlays = [ inputs.quadshell.overlays.default ]; + # quadshell's Bluetooth arrow opens it, and it needs its daemon + services.adw-bluetooth.enable = true; + # quadshell is GeoClue's agent, for its location toggle services.geoclue2 = { enableDemoAgent = false; From 52e7a2ad8a298a582b684dc7503c1a009a164edd Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 00:19:36 -0500 Subject: [PATCH 46/70] bump lock --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 9290592..643a66a 100644 --- a/flake.lock +++ b/flake.lock @@ -1234,11 +1234,11 @@ ] }, "locked": { - "lastModified": 1794976248, - "narHash": "sha256-vv6IgqH+5RKo6IphzOS6Zz93AVBWqRO+0s3sVyyKZDc=", + "lastModified": 1794979141, + "narHash": "sha256-4t8tYCQZ74ZL6AKlvKXfGW0oVULbC5+k1l+92ZYtt1w=", "ref": "refs/heads/main", - "rev": "518ffa31b4d11580391496464c07ade603f02de7", - "revCount": 6, + "rev": "09e95226237bc10756b12cb45df4cec106b0d862", + "revCount": 7, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/quadshell" }, From cdec9161f12379ecb49fd8ef949ddd4a4e0056d0 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 00:34:59 -0500 Subject: [PATCH 47/70] remove extra padding to the right of hamburger on librewolf --- modules/graphical/librewolf/customChrome.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/graphical/librewolf/customChrome.css b/modules/graphical/librewolf/customChrome.css index 2abac59..4083f51 100644 --- a/modules/graphical/librewolf/customChrome.css +++ b/modules/graphical/librewolf/customChrome.css @@ -30,7 +30,8 @@ /* Menus */ --gnome-menu-background: #3b4252; --gnome-menu-border-color: rgba(0, 0, 0, 0.14); - --gnome-menu-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.09), + --gnome-menu-shadow: + 0 1px 5px 1px rgba(0, 0, 0, 0.09), 0 2px 14px 3px rgba(0, 0, 0, 0.05); --gnome-menu-button-hover-background: var(--gnome-button-background); --gnome-menu-separator-color: rgba(255, 255, 255, 0.1); @@ -141,4 +142,8 @@ .urlbarView { background: var(--gnome-menu-background) !important; } + + :root[customtitlebar] #nav-bar > .titlebar-buttonbox-container { + display: none !important; + } } From a6761a8848af27d965c1ab46ae5e029d0c6f39c1 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 00:42:09 -0500 Subject: [PATCH 48/70] bump quadshell --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 643a66a..95d3516 100644 --- a/flake.lock +++ b/flake.lock @@ -1234,11 +1234,11 @@ ] }, "locked": { - "lastModified": 1794979141, - "narHash": "sha256-4t8tYCQZ74ZL6AKlvKXfGW0oVULbC5+k1l+92ZYtt1w=", + "lastModified": 1794980506, + "narHash": "sha256-jMiHJkciswdFlvdmufkdCPWExqBTVWGWjWNEM1CgJfY=", "ref": "refs/heads/main", - "rev": "09e95226237bc10756b12cb45df4cec106b0d862", - "revCount": 7, + "rev": "ab8a5b9a3a2128e7bad401a66540659df6d9314e", + "revCount": 8, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/quadshell" }, From 5c4f2f344af851d630dfbd7b8806c3aaf5d6e9bf Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 00:57:28 -0500 Subject: [PATCH 49/70] bump niri --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 95d3516..9ab5db6 100644 --- a/flake.lock +++ b/flake.lock @@ -959,11 +959,11 @@ ] }, "locked": { - "lastModified": 1794889881, - "narHash": "sha256-ZI7YfIbZbC7e2hQHQSWzOma6npDAvwTgNIFUC6lS8+8=", + "lastModified": 1794981290, + "narHash": "sha256-+7bZ0MF9mZVplVvXR8IJVn11rEZsFqMH/N3X/hM6eD8=", "owner": "Henry-Hiles", "repo": "niri", - "rev": "82e7e8e1d40e21f250dc0e9cf24a441476c32718", + "rev": "9d93d7491ed53ca632f9a3717bd12b23b1af80aa", "type": "github" }, "original": { From 9b9c734835bbcee8da6fbbfa48483ad60e5d4f92 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 10:32:21 -0500 Subject: [PATCH 50/70] bump lock --- flake.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 9ab5db6..5f8f7c2 100644 --- a/flake.lock +++ b/flake.lock @@ -959,11 +959,11 @@ ] }, "locked": { - "lastModified": 1794981290, - "narHash": "sha256-+7bZ0MF9mZVplVvXR8IJVn11rEZsFqMH/N3X/hM6eD8=", + "lastModified": 1795015583, + "narHash": "sha256-hjpdek5tpFs5VWCRLiFWoZxpbDS8LsKF8W1fWjPFGKE=", "owner": "Henry-Hiles", "repo": "niri", - "rev": "9d93d7491ed53ca632f9a3717bd12b23b1af80aa", + "rev": "7dccc45036f4e967012fece5a82518e91611445c", "type": "github" }, "original": { @@ -1234,11 +1234,11 @@ ] }, "locked": { - "lastModified": 1794980506, - "narHash": "sha256-jMiHJkciswdFlvdmufkdCPWExqBTVWGWjWNEM1CgJfY=", + "lastModified": 1795014593, + "narHash": "sha256-BPxE0o1cicSrKejw1Zy0yNV2c6eEFpYxQLxaJnDwA+A=", "ref": "refs/heads/main", - "rev": "ab8a5b9a3a2128e7bad401a66540659df6d9314e", - "revCount": 8, + "rev": "66bdba9a05985399d99a8d34278dd59fdf0669e5", + "revCount": 10, "type": "git", "url": "https://git.federated.nexus/Henry-Hiles/quadshell" }, From d67ccd8d1e200ab0ed3d6a7b4ca9f85221ba5ff1 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 10:50:51 -0500 Subject: [PATCH 51/70] bump lock --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 5f8f7c2..9bed740 100644 --- a/flake.lock +++ b/flake.lock @@ -301,11 +301,11 @@ ] }, "locked": { - "lastModified": 1793997955, - "narHash": "sha256-Smi0gGdpBHiowEIU1oNBkeUx+27VcYJpz2Z7X7hFC1I=", + "lastModified": 1795004531, + "narHash": "sha256-3fvQO3U9rhUkBNxe56X6Ta5huTShZ2mtavi49o7tMvY=", "owner": "degoog-org", "repo": "degoog", - "rev": "cf012d9b639b9d5d874560ab69b31e02d29a6bb4", + "rev": "5490ca46096167cbf9b6f9480e7ac83726c0ce7e", "type": "github" }, "original": { @@ -799,11 +799,11 @@ ] }, "locked": { - "lastModified": 1794806514, - "narHash": "sha256-hRJv/aBOgTE5HnUFWi7yD1vTckeZ+WNIrrJ/hLhLQiM=", + "lastModified": 1794948232, + "narHash": "sha256-ngHNaADvk405ZLGgGK4j1AqbXTEVSQFN94Dw0KqSJI8=", "ref": "refs/heads/main", - "rev": "c3d58126ff1351d85bc03a1139139324898559cb", - "revCount": 383, + "rev": "51021d3af207c519ab5d9824af940d48ca9eabc1", + "revCount": 393, "type": "git", "url": "https://codeberg.org/pastthepixels/gaypanel" }, @@ -860,11 +860,11 @@ ] }, "locked": { - "lastModified": 1794715309, - "narHash": "sha256-awkBBs5ctFKgEYjpNGpi3t/VqF589n5EWfdinRb2gNI=", + "lastModified": 1794963576, + "narHash": "sha256-+CPrP74GDJ63f7bgEFC9Av4hbxc7K9WUNv1ZVRifRe8=", "owner": "nix-community", "repo": "home-manager", - "rev": "a1293da7dd8e497e08d26173f97e2976b36a31ea", + "rev": "2b13c9cb3aa20653e6f8ee0b7f8331a53ea9b0a9", "type": "github" }, "original": { @@ -917,11 +917,11 @@ ] }, "locked": { - "lastModified": 1794839305, - "narHash": "sha256-LoJibO1DD1is9P2DtjjqHKBFxmupVlbFb3QavT2wnR0=", + "lastModified": 1795013460, + "narHash": "sha256-GSeulyglamkjHjdD2fCIddwZ2Phy6CZ4GyauzHPi6iE=", "ref": "refs/heads/main", - "rev": "3112871ceb0f1e94513ebb70c01e84c7f3443100", - "revCount": 1255, + "rev": "01938119931f92be47ca0c5b44ece2989b0d482e", + "revCount": 1267, "submodules": true, "type": "git", "url": "https://git.federated.nexus/Nexus/nexus" @@ -959,11 +959,11 @@ ] }, "locked": { - "lastModified": 1795015583, - "narHash": "sha256-hjpdek5tpFs5VWCRLiFWoZxpbDS8LsKF8W1fWjPFGKE=", + "lastModified": 1795016524, + "narHash": "sha256-gpq5p9sIORvbvR5S095ixBprS2/oXIrdXyg+Y8EQtDs=", "owner": "Henry-Hiles", "repo": "niri", - "rev": "7dccc45036f4e967012fece5a82518e91611445c", + "rev": "cd9fabb98e9c3f5048d6f8fd2de5f9460a3efeb8", "type": "github" }, "original": { @@ -1053,11 +1053,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1794537146, - "narHash": "sha256-Wpz/7x/YWnDIBu7yj6ixe8j6fIMsidd9Y+o1PqPF3iM=", + "lastModified": 1794890597, + "narHash": "sha256-lME2lHoDHAaSHP3/okgiVoJ0icVEvsQH8LeU3We7tcc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d5cc6833999746cffdfe0598f7bc801a57b887a9", + "rev": "04906337b6d53e8bb0eaf0470ae9f070a4d4eb55", "type": "github" }, "original": { @@ -1383,11 +1383,11 @@ ] }, "locked": { - "lastModified": 1794833435, - "narHash": "sha256-KrUwt40VEm7MaUULGXRRflSlmyRQEam+0CED+ewOLHE=", + "lastModified": 1795015701, + "narHash": "sha256-S6oHH5S2sziGcqTUBiyzmkABUtsY/JT9eHtozN/N2fg=", "ref": "refs/heads/main", - "rev": "ba9340cee718a8aae962a2171f44d3a25c793589", - "revCount": 8292, + "rev": "4c8b5133de1804a6a759169bcb9fe93124d0ee3e", + "revCount": 8426, "type": "git", "url": "https://git.sable.moe/SableClient/sable-next" }, From 5a9ab1f03e24295f8be5f338d5939b5d678d0170 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 10:59:50 -0500 Subject: [PATCH 52/70] fix gaypanel patch --- wrappers/desktop/gaypanel/no-sound-panic.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrappers/desktop/gaypanel/no-sound-panic.patch b/wrappers/desktop/gaypanel/no-sound-panic.patch index 5cc4018..67b4d9a 100644 --- a/wrappers/desktop/gaypanel/no-sound-panic.patch +++ b/wrappers/desktop/gaypanel/no-sound-panic.patch @@ -1,6 +1,6 @@ -diff -ru a/src/system/sound.rs b/src/system/sound.rs ---- a/src/system/sound.rs -+++ b/src/system/sound.rs +diff -ru a/src/core/system/sound.rs b/src/core/system/sound.rs +--- a/src/core/system/sound.rs ++++ b/src/core/system/sound.rs @@ -158,7 +158,16 @@ fn init() { From f924151c68e09db3327781f3f4999258c1aa4d1f Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 11:58:34 -0500 Subject: [PATCH 53/70] remove old cross fixes that are no longer needed --- clients/quadphone/cross-fixes.nix | 48 ------------------------------- clients/quadphone/cross.nix | 13 +-------- flake.lock | 15 +++++----- flake.nix | 2 +- modules/mobile/niri.nix | 7 ++--- 5 files changed, 13 insertions(+), 72 deletions(-) diff --git a/clients/quadphone/cross-fixes.nix b/clients/quadphone/cross-fixes.nix index 761215a..b321114 100644 --- a/clients/quadphone/cross-fixes.nix +++ b/clients/quadphone/cross-fixes.nix @@ -1,56 +1,8 @@ { - inputs, lib, ... }: { - nixpkgs.overlays = [ - (final: prev: { - gnome = prev.gnome // { - nixos-gsettings-overrides = prev.gnome.nixos-gsettings-overrides.override { - glib = final.buildPackages.glib; - }; - }; - - # Meson looks for gio and gdbus-codegen for the build machine - gnome-session = prev.gnome-session.overrideAttrs (old: { - depsBuildBuild = (old.depsBuildBuild or [ ]) ++ [ - final.pkgsBuildBuild.pkg-config - final.pkgsBuildBuild.glib - ]; - }); - }) - ]; - # TODO: flutter apps don't cross compile, and the flake's package isn't cached programs.nexus.enable = lib.mkForce false; - - # The cache builder doesn't find gtk-query-immodules-3.0 when cross compiling, - # and GNOME Shell connects apps to IBus itself, so the GTK module isn't used anyway. - i18n.inputMethod.enableGtk3 = false; - - # Needs python gi on the build machine, and only connects desktop browsers to - # extensions.gnome.org anyway. - services.gnome.gnome-browser-connector.enable = false; - - # nix-maid runs the host mustache-go at build time, swap in a copy of its core - # module that uses the build platform's one for that step. - # TODO: upstream (use pkgs.buildPackages.mustache-go in core.nix) - maid.sharedModules = - let - core = "${inputs.nix-maid}/src/maid/modules/core.nix"; - in - [ - { - disabledModules = [ core ]; - imports = [ - (builtins.toFile "nix-maid-core.nix" ( - builtins.replaceStrings - [ "import ../vars.nix" "lib.getExe pkgs.mustache-go" ] - [ "import ${inputs.nix-maid}/src/maid/vars.nix" "lib.getExe pkgs.buildPackages.mustache-go" ] - (builtins.readFile core) - )) - ]; - } - ]; } diff --git a/clients/quadphone/cross.nix b/clients/quadphone/cross.nix index 2a5f46e..063011d 100644 --- a/clients/quadphone/cross.nix +++ b/clients/quadphone/cross.nix @@ -5,7 +5,6 @@ ... }: let - cfg = config.quadphone; host = config.nixpkgs.hostPlatform; otherOverlays = lib.init config.nixpkgs.overlays; @@ -41,8 +40,7 @@ let let name = lib.concatStringsSep "." path; in - !(builtins.elem name cfg.crossPackages) - && builtins.match toolchainRegex name == null + builtins.match toolchainRegex name == null && lib.isDerivation native && lib.meta.availableOn host native && (native.meta.license.free or true) @@ -96,15 +94,6 @@ let v; in { - options.quadphone.crossPackages = lib.mkOption { - type = with lib.types; listOf str; - default = [ ]; - description = '' - Top-level attribute names that should always be cross-compiled instead of - substituted from the binary cache (i.e. ones that turn out not to be cached). - ''; - }; - config = { nixpkgs.buildPlatform = "x86_64-linux"; diff --git a/flake.lock b/flake.lock index 9bed740..bc58fcc 100644 --- a/flake.lock +++ b/flake.lock @@ -996,17 +996,18 @@ }, "nix-maid": { "locked": { - "lastModified": 1794213517, - "narHash": "sha256-bryY6i495uT5OEz0eSeTPeJ35E6JLpI0PjPGNa5EdRk=", - "ref": "refs/heads/master", - "rev": "d4f00026e380858e683a022abe313a0ae52ad2c0", - "revCount": 136, + "lastModified": 1795019049, + "narHash": "sha256-bxUur5b6+llgV+XlGcSGApS3Z/iIINYz3Rt4/poxX5c=", + "ref": "quad/fix/cross-mustache", + "rev": "ccd9b3f24f80e4aa9b25074e50fb1c1a8124f4d0", + "revCount": 137, "type": "git", - "url": "https://codeberg.org/viperML/nix-maid" + "url": "https://codeberg.org/Henry-Hiles/nix-maid" }, "original": { + "ref": "quad/fix/cross-mustache", "type": "git", - "url": "https://codeberg.org/viperML/nix-maid" + "url": "https://codeberg.org/Henry-Hiles/nix-maid" } }, "nix2flatpak": { diff --git a/flake.nix b/flake.nix index 0d6477c..fc1b285 100755 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; wrapper-manager.url = "git+https://codeberg.org/viperML/wrapper-manager"; flake-parts.url = "github:hercules-ci/flake-parts"; - nix-maid.url = "git+https://codeberg.org/viperML/nix-maid"; + nix-maid.url = "git+https://codeberg.org/Henry-Hiles/nix-maid?ref=quad/fix/cross-mustache"; gadgetfs = { url = "github:sorki/nixos-gadgetfs-proto"; flake = false; diff --git a/modules/mobile/niri.nix b/modules/mobile/niri.nix index 8b0207d..451b330 100644 --- a/modules/mobile/niri.nix +++ b/modules/mobile/niri.nix @@ -133,10 +133,9 @@ in HandlePowerKeyLongPress = "poweroff"; }; - # Let GTK use text-input-v3, so the on-screen keyboard gets the text fields. - environment.extraInit = '' - unset GTK_IM_MODULE QT_IM_MODULE XMODIFIERS - ''; + # GNOME's core-os-services turns on IBus, but GTK has to use text-input-v3 + # so the on-screen keyboard gets the text fields. + i18n.inputMethod.enable = false; users.users.quadradical.maid.gsettings.settings.org.gnome.desktop = { a11y.applications.screen-keyboard-enabled = true; From 4e94ad7b704ed92bc495c11fb573a44b0323bbdb Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 12:01:38 -0500 Subject: [PATCH 54/70] add comment as to why olm is needed --- modules/mobile/phone.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/mobile/phone.nix b/modules/mobile/phone.nix index 951a477..5fcb798 100644 --- a/modules/mobile/phone.nix +++ b/modules/mobile/phone.nix @@ -9,6 +9,7 @@ chatty ]; + # chatty always links libcmatrix, which needs olm, even if Matrix isn't used nixpkgs.config.permittedInsecurePackages = [ "olm-3.2.16" ]; From 14a2d77ca4d63ed5616d340b23f3ec3f61bfccd3 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 12:11:00 -0500 Subject: [PATCH 55/70] bump nix-maid --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index bc58fcc..cffdc1d 100644 --- a/flake.lock +++ b/flake.lock @@ -996,11 +996,11 @@ }, "nix-maid": { "locked": { - "lastModified": 1795019049, - "narHash": "sha256-bxUur5b6+llgV+XlGcSGApS3Z/iIINYz3Rt4/poxX5c=", + "lastModified": 1795021775, + "narHash": "sha256-KwipEAmXRwCpFccoUXkE7bw4Rg3Fqlm0GpSVNLlvCTU=", "ref": "quad/fix/cross-mustache", - "rev": "ccd9b3f24f80e4aa9b25074e50fb1c1a8124f4d0", - "revCount": 137, + "rev": "f1fc27b1a9f4c2707a229683843edd97738b248b", + "revCount": 138, "type": "git", "url": "https://codeberg.org/Henry-Hiles/nix-maid" }, From 4c451ce3df8ecf5b39e55d80cfb80da18d3897d4 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 18 Nov 2026 22:10:24 -0500 Subject: [PATCH 56/70] add FDE for quadphone and quadtop --- clients/quadphone/fde.nix | 14 +++++++++ clients/quadtop/disko.nix | 36 ++++++++++++++++++++++ clients/quadtop/hardware-configuration.nix | 12 -------- 3 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 clients/quadphone/fde.nix create mode 100644 clients/quadtop/disko.nix diff --git a/clients/quadphone/fde.nix b/clients/quadphone/fde.nix new file mode 100644 index 0000000..7cf6c72 --- /dev/null +++ b/clients/quadphone/fde.nix @@ -0,0 +1,14 @@ +{ + # The image is built with an empty LUKS passphrase (systemd-repart can't take a + # key file through the NixOS image builder). After flashing, set a real passphrase + # and rotate the volume key, since the image's key is sitting in the nix store: + # run0 systemd-cryptenroll --password --wipe-slot=empty /dev/disk/by-partlabel/nixos + # run0 cryptsetup reencrypt /dev/disk/by-partlabel/nixos + image.repart.partitions."30-root".repartConfig.Encrypt = "key-file"; + + boot.initrd = { + luks.forceLuksSupportInInitrd = true; + availableKernelModules = [ "msm" ]; + unl0kr.enable = true; + }; +} diff --git a/clients/quadtop/disko.nix b/clients/quadtop/disko.nix new file mode 100644 index 0000000..22fd73e --- /dev/null +++ b/clients/quadtop/disko.nix @@ -0,0 +1,36 @@ +{ inputs, ... }: +{ + imports = [ inputs.disko.nixosModules.disko ]; + disko.devices.disk.main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "cryptroot"; + settings.allowDiscards = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; +} diff --git a/clients/quadtop/hardware-configuration.nix b/clients/quadtop/hardware-configuration.nix index 1e051cc..b3e0eb8 100755 --- a/clients/quadtop/hardware-configuration.nix +++ b/clients/quadtop/hardware-configuration.nix @@ -14,17 +14,5 @@ extraModulePackages = [ ]; }; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/15598217-e3e1-4922-b336-8e9f62fad939"; - fsType = "ext4"; - }; - "/boot" = { - device = "/dev/disk/by-uuid/C6EC-B430"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - }; - hardware.cpu.intel.updateMicrocode = true; } From c77f8dc415536632183a5ec767c88e684b635d31 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 00:33:14 -0500 Subject: [PATCH 57/70] hide firebutton on ff --- modules/graphical/librewolf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/graphical/librewolf/default.nix b/modules/graphical/librewolf/default.nix index 2cf5d59..b52fce1 100644 --- a/modules/graphical/librewolf/default.nix +++ b/modules/graphical/librewolf/default.nix @@ -42,6 +42,7 @@ "webgl.disabled" = false; "font.name-list.emoji" = ""; "browser.tabs.groups.enabled" = false; + "browser.fireButton.enabled" = false; "media.peerconnection.enabled" = true; "privacy.resistFingerprinting" = false; "browser.ml.linkPreview.enabled" = false; @@ -55,7 +56,6 @@ "browser.uiCustomization.state" = builtins.toJSON { currentVersion = 28; placements = { - widget-overflow-fixed-list = [ ]; nav-bar = [ "back-button" "forward-button" From 69eafd84251b049f893e3208f27854de249f2818 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 00:36:54 -0500 Subject: [PATCH 58/70] drop authenticator --- modules/desktop/packages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/desktop/packages.nix b/modules/desktop/packages.nix index 6d8e15d..1390716 100644 --- a/modules/desktop/packages.nix +++ b/modules/desktop/packages.nix @@ -6,7 +6,6 @@ heroic inkscape libreoffice - authenticator prismlauncher ]; } From 23c5c120f773883528e50f91de08a356ce5d5d24 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 01:03:03 -0500 Subject: [PATCH 59/70] fixup unl0kr on mobile --- clients/quadphone/fde.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clients/quadphone/fde.nix b/clients/quadphone/fde.nix index 7cf6c72..14bd185 100644 --- a/clients/quadphone/fde.nix +++ b/clients/quadphone/fde.nix @@ -9,6 +9,10 @@ boot.initrd = { luks.forceLuksSupportInInitrd = true; availableKernelModules = [ "msm" ]; - unl0kr.enable = true; + unl0kr = { + enable = true; + settings.general.backend = "drm"; + }; + systemd.settings.Manager.DefaultDeviceTimeoutSec = "infinity"; }; } From 2ecb47c6a9e24d72ab4db7c6fa88dbced94869d6 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 11:02:26 -0500 Subject: [PATCH 60/70] working unl0kr --- clients/quadphone/fde.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/clients/quadphone/fde.nix b/clients/quadphone/fde.nix index 14bd185..93b1b2d 100644 --- a/clients/quadphone/fde.nix +++ b/clients/quadphone/fde.nix @@ -8,10 +8,20 @@ boot.initrd = { luks.forceLuksSupportInInitrd = true; - availableKernelModules = [ "msm" ]; + kernelModules = [ + "msm" + "qcom_refgen_regulator" + "qcom_spmi_haptics" + ]; unl0kr = { enable = true; - settings.general.backend = "drm"; + settings = { + general.backend = "drm"; + theme = { + default = "nord-dark"; + alternate = "nord-light"; + }; + }; }; systemd.settings.Manager.DefaultDeviceTimeoutSec = "infinity"; }; From 569518fa7c7330c5f5858dd75daf66caa613bd87 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 11:07:41 -0500 Subject: [PATCH 61/70] add different passwords per-host --- modules/common/users.nix | 26 +++++++++++-------- secrets/password-quadphone.age | 10 +++++++ ...{password.age => password-quadraticpc.age} | 0 secrets/password-quadraticserver.age | 11 ++++++++ secrets/password-quadtop.age | 11 ++++++++ 5 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 secrets/password-quadphone.age rename secrets/{password.age => password-quadraticpc.age} (100%) create mode 100644 secrets/password-quadraticserver.age create mode 100644 secrets/password-quadtop.age diff --git a/modules/common/users.nix b/modules/common/users.nix index 3a3cc79..037ae28 100644 --- a/modules/common/users.nix +++ b/modules/common/users.nix @@ -2,17 +2,21 @@ { users = { mutableUsers = false; - users = { - root.hashedPasswordFile = config.age.secrets."password.age".path; - quadradical = { - isNormalUser = true; - hashedPasswordFile = config.age.secrets."password.age".path; - description = "QuadRadical"; - extraGroups = [ - "wheel" - "networkmanager" - ]; + users = + let + password = config.age.secrets."password-${config.networking.hostName}.age".path; + in + { + root.hashedPasswordFile = password; + quadradical = { + isNormalUser = true; + hashedPasswordFile = password; + description = "QuadRadical"; + extraGroups = [ + "wheel" + "networkmanager" + ]; + }; }; - }; }; } diff --git a/secrets/password-quadphone.age b/secrets/password-quadphone.age new file mode 100644 index 0000000..9f3e686 --- /dev/null +++ b/secrets/password-quadphone.age @@ -0,0 +1,10 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSBGNVFs +REE0cndoQ002TDdrQzFtMmw1RERaY0xnajVuYjgvNkw0aWlhVndzCkxUVzlHZ0tm +MlFZUytHUlhvZmI1TE5aN3pXcmhwZ3ViUnVkQ1BUNHNac1EKLT4gJy1ncmVhc2Ug +TlxePzd7flEgeVsgOXU7IDxhdmZaCitkUlRCVWU2cnBiVTh2YXc3aktlaTBGajkw +VUl2RTQKLS0tIEwrdkFNUTd4ZzFpV1N3ZDBpQnREQTFMaTdNSVRGMkIwZUNRV1lR +NElVTlEKD3nduDFOvdiQj3fnDP8nXTk29Wv6rEzwPo+9QGztxgFxZETvO7LgFF46 +boM+33qpaW/x34nAgzUlhsIZoN7Js4slFTHlibxn6g3hJceNeTW5DhngO/teoFX3 +W1UP9oFcTwt3wOP09203LA== +-----END AGE ENCRYPTED FILE----- diff --git a/secrets/password.age b/secrets/password-quadraticpc.age similarity index 100% rename from secrets/password.age rename to secrets/password-quadraticpc.age diff --git a/secrets/password-quadraticserver.age b/secrets/password-quadraticserver.age new file mode 100644 index 0000000..f2e3879 --- /dev/null +++ b/secrets/password-quadraticserver.age @@ -0,0 +1,11 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSBKQ29L +VTVOL1FyeXBKUWpHRkVodmRnTXdMenppUHJrOHl1WmhTdkFnTTBzCkY3T0dlN1d1 +OExlRnQzZ2FrbU5nd1pLQzUxSlVubHhaS0x4Wm4zRzVnNEUKLT4gW1twcC1ncmVh +c2UgRUlhTmJxIHA0CjBmU3U3dEZ0OFpXUDZockwwcmQwQUd6Tjg4TXQyWVcwOXZO +ZG9YYnBGckd4RWpxNEorVnlCb0lMa205TXJVWDgKSGpmalV1WWp2cXlyRFFFaWNy +VjIrSzZJCi0tLSBiVC8rTjU0aTNRdEd5SG1talBHa1lMdGJURTNkb1VSd0VML3dq +N3hFb09zCg82/CrPNT58LNfrZRKvK31rmnTySJW8bImJIdmsneAhthoTCRjcvLXV +7WUfnbeUsDMEqUB2soABF0EwdezUnbAlt+Pu/4cPLDWPKCCvEZL7T8vAwXtUc7YO +fIZmFPL0G8upe/Gk/Nbz7Is= +-----END AGE ENCRYPTED FILE----- diff --git a/secrets/password-quadtop.age b/secrets/password-quadtop.age new file mode 100644 index 0000000..6dff80b --- /dev/null +++ b/secrets/password-quadtop.age @@ -0,0 +1,11 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSBEV0RT +bkNvWUlDS2xDVVBHS0F2MkV1dHViTUE1OFc1YnVhcjIyOHVWeUJFClFPZlFnZGxn +eitkMkRvN0doUlpRbkhVVXhoRlFXL1VZRWQvbDZWQXVKUEEKLT4gXT5rTUZ6I34t +Z3JlYXNlIGJqPGVyUG4gYCB3RwpjZW9PSkE0ZlFCU1BtM3JPeWN6dmlYNzQwUG84 +alpNNVdKV0xDbHFSWUVRNndGcFBGdXlUQ1B4MFZ4cVN5bi9vCmhSMmFtQQotLS0g +OUlNVUdqOHFma2hrMmhlRkxyWHg1ZUtjeks1d0Nzc1BWWjhIR0E1K2lpUQru2QnH +9wvPXC5qDcMxrOTDgwPFWI/4SCS7Jj2b89hwQDQmpBTg1KJ09X2u3JEUe4aijxcZ +YqPqWs9cS8NZhg09xuTBGpTmp6+yJf1CmgWx3TYL+6TkgiRF1abKJYJgW9qADgeq +ZWEaLU73 +-----END AGE ENCRYPTED FILE----- From 13b7f4b67eaa9c8fb4ab706ec612197e75876333 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 11:32:43 -0500 Subject: [PATCH 62/70] fixup startup race --- clients/quadraticserver/degoog.nix | 14 +++++++++----- clients/quadraticserver/kanidm/default.nix | 8 ++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/clients/quadraticserver/degoog.nix b/clients/quadraticserver/degoog.nix index b7b9726..8223998 100644 --- a/clients/quadraticserver/degoog.nix +++ b/clients/quadraticserver/degoog.nix @@ -20,7 +20,7 @@ displayName = "Search"; originUrl = "https://${domain}/oauth2/callback"; originLanding = "https://${domain}"; - imageFile = "${config.services.degoog.package}/share/degoog/src/public/images/degoog-logo.svg"; + imageFile = "${config.services.degoog.package}/share/degoog/src/public/images/degoog-logo.svg"; basicSecretFile = "/var/lib/kanidm-oauth2-secrets/${client}"; preferShortUsername = true; scopeMaps.idm_all_persons = [ @@ -74,10 +74,14 @@ }; systemd.services = { - caddy.serviceConfig.SupplementaryGroups = [ - "degoog" - "oauth2-proxy" - ]; + caddy = { + wants = [ "degoog.service" ]; + after = [ "degoog.service" ]; + serviceConfig.SupplementaryGroups = [ + "degoog" + "oauth2-proxy" + ]; + }; oauth2-proxy = { requires = [ "kanidm.service" ]; diff --git a/clients/quadraticserver/kanidm/default.nix b/clients/quadraticserver/kanidm/default.nix index 18fb817..2418dbf 100644 --- a/clients/quadraticserver/kanidm/default.nix +++ b/clients/quadraticserver/kanidm/default.nix @@ -339,6 +339,8 @@ in serviceConfig = hardening // { Type = "oneshot"; RemainAfterExit = true; + Restart = "on-failure"; + RestartSec = 5; User = "kanidm"; Group = "kanidm"; StateDirectory = "kanidm-bootstrap"; @@ -397,8 +399,10 @@ in kanidm-mail-sender = { description = "Kanidm mail sender"; wantedBy = [ "multi-user.target" ]; - wants = [ "network-online.target" ]; - requires = [ "kanidm-bootstrap.service" ]; + wants = [ + "network-online.target" + "kanidm-bootstrap.service" + ]; after = [ "network-online.target" "kanidm-bootstrap.service" From d80d82b312a581533d0ccd4fade0a59dd5bec5af Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 11:40:43 -0500 Subject: [PATCH 63/70] use other branch of nixphone --- clients/quadphone/fde.nix | 5 ----- flake.lock | 11 ++++++----- flake.nix | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/clients/quadphone/fde.nix b/clients/quadphone/fde.nix index 93b1b2d..5244025 100644 --- a/clients/quadphone/fde.nix +++ b/clients/quadphone/fde.nix @@ -8,11 +8,6 @@ boot.initrd = { luks.forceLuksSupportInInitrd = true; - kernelModules = [ - "msm" - "qcom_refgen_regulator" - "qcom_spmi_haptics" - ]; unl0kr = { enable = true; settings = { diff --git a/flake.lock b/flake.lock index cffdc1d..0d86dbc 100644 --- a/flake.lock +++ b/flake.lock @@ -1039,15 +1039,16 @@ ] }, "locked": { - "lastModified": 1794327622, - "narHash": "sha256-mJlrDqLL7Xqz1avdukOJyaA52EauQMoJ6/DBO7rptQg=", - "ref": "refs/heads/master", - "rev": "5dc82c9de380dba9df746ad516363d08b1fe4c93", - "revCount": 53, + "lastModified": 1795105247, + "narHash": "sha256-S0pWLHzB0u7y/t9OUk+xhxWNqIFY8DuJA2S2ONNQmww=", + "ref": "quad/fix/sdm845-initrd", + "rev": "fbcf8cf2e49c21af5cb1bdcf9f661af74d2dc8b3", + "revCount": 54, "type": "git", "url": "https://codeberg.org/nixphone/nixphone" }, "original": { + "ref": "quad/fix/sdm845-initrd", "type": "git", "url": "https://codeberg.org/nixphone/nixphone" } diff --git a/flake.nix b/flake.nix index fc1b285..6e10c45 100755 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ flake = false; }; nixphone = { - url = "git+https://codeberg.org/nixphone/nixphone"; + url = "git+https://codeberg.org/nixphone/nixphone?ref=quad/fix/sdm845-initrd"; inputs.nixpkgs.follows = "nixpkgs"; }; continuwuity = { From a4c67b30585eb8d76442f84068f3619270b13c20 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 13:40:46 -0500 Subject: [PATCH 64/70] add fprintd to quadtop --- clients/quadtop/fingerprint.nix | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 clients/quadtop/fingerprint.nix diff --git a/clients/quadtop/fingerprint.nix b/clients/quadtop/fingerprint.nix new file mode 100644 index 0000000..2c6c121 --- /dev/null +++ b/clients/quadtop/fingerprint.nix @@ -0,0 +1,4 @@ +{ + # Enroll after install with `fprintd-enroll`. + services.fprintd.enable = true; +} From cad420aa4a07c22af923f2928a9addc3db2e00f1 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 13:54:14 -0500 Subject: [PATCH 65/70] bring back hyprlock on desktop --- modules/desktop/wm/gtklock.nix | 213 -------------------------------- modules/desktop/wm/hyprlock.nix | 60 +++++++++ 2 files changed, 60 insertions(+), 213 deletions(-) delete mode 100644 modules/desktop/wm/gtklock.nix create mode 100644 modules/desktop/wm/hyprlock.nix diff --git a/modules/desktop/wm/gtklock.nix b/modules/desktop/wm/gtklock.nix deleted file mode 100644 index 85fecab..0000000 --- a/modules/desktop/wm/gtklock.nix +++ /dev/null @@ -1,213 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (config.lib.stylix) colors; - - background = - pkgs.runCommand "lock-background.jpg" { nativeBuildInputs = [ pkgs.buildPackages.imagemagick ]; } - '' - magick ${../../../background.jpg} -resize 50% -blur 0x16 -modulate 80 $out - ''; - - layout = pkgs.writeText "gtklock.ui" '' - - - - window-box - - external - never - - - none - - - content-box - center - center - vertical - - - info-box - vertical - - - time-box - vertical - - - clock-label - - - - - date-label - - - - - - - - - none - - - center - 8 - - - 1 - - - - - input-field - 300 - 0.5 - 0 - 0 - password - Input Password - - - - 0 - 0 - - - - - none - 1 - - - never - 256 - 1 - - - - - vertical - 1 - - - - - - - - - 0 - 1 - - - - - center - vertical - - - error-label - 1 - center - - - - - warning-label - 1 - center - - - - - 1 - - - - - - 0 - 2 - - - - - - - - - - - - - ''; -in -{ - options.quad.lock = lib.mkOption { - type = lib.types.package; - readOnly = true; - description = "Locks the session with gtklock, unless it's already running."; - default = pkgs.writeShellScript "lock" '' - exec ${lib.getExe' pkgs.util-linux "flock"} --nonblock "$XDG_RUNTIME_DIR/gtklock.lock" \ - ${lib.getExe' config.systemd.package "systemd-cat"} --identifier=gtklock \ - ${lib.getExe config.programs.gtklock.package} - ''; - }; - - config.programs.gtklock = { - enable = true; - - config.main = { - layout = "${layout}"; - time-format = "%H:%M"; - date-format = "%A, %B %-d"; - }; - - style = '' - window { - background-image: url("${background}"); - background-size: cover; - background-position: center; - } - - #window-box, - #window-box viewport { - background: none; - } - - #clock-label { - font-size: 96pt; - color: white; - } - - #date-label { - font-size: 20pt; - color: white; - margin-bottom: 80px; - } - - #input-field { - min-height: 50px; - padding: 0 20px; - border: none; - border-radius: 25px; - box-shadow: none; - background: #${colors.base01}; - color: #${colors.base05}; - } - - #error-label, - #warning-label { - color: #${colors.base08}; - } - ''; - }; -} diff --git a/modules/desktop/wm/hyprlock.nix b/modules/desktop/wm/hyprlock.nix new file mode 100644 index 0000000..2471ce6 --- /dev/null +++ b/modules/desktop/wm/hyprlock.nix @@ -0,0 +1,60 @@ +{ + config, + lib, + pkgs, + ... +}: +let + inherit (config.lib.stylix) colors; + + hyprlockConfig = pkgs.writeText "hyprlock.conf" '' + auth { + fingerprint { + enabled = ${lib.boolToString config.services.fprintd.enable} + ready_message = Scan fingerprint to unlock + present_message = Scanning... + } + } + + background { + path = screenshot + blur_passes = 3 + } + + label { + text = $TIME + font_size = 96 + position = 0, 200 + } + + label { + text = cmd[update:60000] date +"%A, %B %-d" + font_size = 20 + position = 0, 110 + } + + input-field { + size = 300, 50 + outline_thickness = 0 + inner_color = rgb(${colors.base01}) + font_color = rgb(${colors.base05}) + check_color = rgb(${colors.base0D}) + fade_on_empty = false + ${lib.optionalString config.services.fprintd.enable "placeholder_text = $FPRINTPROMPT"} + } + ''; +in +{ + options.quad.lock = lib.mkOption { + type = lib.types.package; + readOnly = true; + description = "Locks the session with hyprlock, unless it's already running."; + default = pkgs.writeShellScript "lock" '' + exec ${lib.getExe' pkgs.util-linux "flock"} --nonblock "$XDG_RUNTIME_DIR/hyprlock.lock" \ + ${lib.getExe' config.systemd.package "systemd-cat"} --identifier=hyprlock \ + ${lib.getExe pkgs.hyprlock} --config ${hyprlockConfig} + ''; + }; + + config.security.pam.services.hyprlock.fprintAuth = false; +} From 57ceabb1a153dde10ce6ed25d03c46190bd4f952 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 14:01:45 -0500 Subject: [PATCH 66/70] remove leftover hardware stuff from old laptop --- clients/quadtop/gamescope.nix | 2 +- clients/quadtop/hardware-configuration.nix | 22 +++++++++------------- clients/quadtop/nvidia.nix | 19 ------------------- 3 files changed, 10 insertions(+), 33 deletions(-) delete mode 100644 clients/quadtop/nvidia.nix diff --git a/clients/quadtop/gamescope.nix b/clients/quadtop/gamescope.nix index 08e4c12..1ffb883 100644 --- a/clients/quadtop/gamescope.nix +++ b/clients/quadtop/gamescope.nix @@ -3,6 +3,6 @@ "--force-grab-cursor" "-W 1920" "-H 1080" - "-r 120" + "-r 60" ]; } diff --git a/clients/quadtop/hardware-configuration.nix b/clients/quadtop/hardware-configuration.nix index b3e0eb8..c944e9b 100755 --- a/clients/quadtop/hardware-configuration.nix +++ b/clients/quadtop/hardware-configuration.nix @@ -1,18 +1,14 @@ { boot = { - initrd = { - availableKernelModules = [ - "xhci_pci" - "ahci" - "nvme" - "usb_storage" - "sd_mod" - ]; - kernelModules = [ ]; - }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; + initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + ]; + kernelModules = [ "kvm-amd" ]; }; - hardware.cpu.intel.updateMicrocode = true; + hardware = { + amdgpu.initrd.enable = true; + cpu.amd.updateMicrocode = true; + }; } diff --git a/clients/quadtop/nvidia.nix b/clients/quadtop/nvidia.nix deleted file mode 100644 index f308113..0000000 --- a/clients/quadtop/nvidia.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - - intelBusId = "PCI:00:02:0"; - nvidiaBusId = "PCI:01:00:0"; - }; - open = true; - nvidiaSettings = false; - nvidiaPersistenced = false; - dynamicBoost.enable = true; - powerManagement.finegrained = true; - }; -} From 1e452a769862b2c1c9ed9ca8125c6f92797fd79b Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 14:10:05 -0500 Subject: [PATCH 67/70] use bg directly for bg of hyprlock --- modules/desktop/wm/hyprlock.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/desktop/wm/hyprlock.nix b/modules/desktop/wm/hyprlock.nix index 2471ce6..a5980b7 100644 --- a/modules/desktop/wm/hyprlock.nix +++ b/modules/desktop/wm/hyprlock.nix @@ -17,7 +17,7 @@ let } background { - path = screenshot + path = ${../../../background.jpg} blur_passes = 3 } From 9edfb60d3ff79b6cc4fad5169cf0d2374849dff2 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 14:14:43 -0500 Subject: [PATCH 68/70] add super+l for lock --- modules/desktop/wm/fht-compositor/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/desktop/wm/fht-compositor/default.nix b/modules/desktop/wm/fht-compositor/default.nix index 1813821..0b12ffb 100644 --- a/modules/desktop/wm/fht-compositor/default.nix +++ b/modules/desktop/wm/fht-compositor/default.nix @@ -112,6 +112,10 @@ in Super-q = "close-focused-window"; Super-f = "fullscreen-focused-window"; Super-Ctrl-q = "quit"; + Super-l = { + action = "run-command"; + arg = "${config.quad.lock}"; + }; Super-Ctrl-r = { action = "run-command"; arg = "fht-compositor ipc action reload-config; session-programs"; From 74286bc43d99dbb0c2728976fe5b08d27b986f5d Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 14:55:45 -0500 Subject: [PATCH 69/70] add monitor shutdown script for quadraticpc --- clients/quadraticpc/monitor-power.nix | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 clients/quadraticpc/monitor-power.nix diff --git a/clients/quadraticpc/monitor-power.nix b/clients/quadraticpc/monitor-power.nix new file mode 100644 index 0000000..9346807 --- /dev/null +++ b/clients/quadraticpc/monitor-power.nix @@ -0,0 +1,58 @@ +{ pkgs, ... }: +let + # Sets VCP 0xD6 (power mode) on every display: 01 = on, 05 = off (even monitors that say they don't support it are usually lying) + monitor-power = pkgs.writeShellApplication { + name = "monitor-power"; + runtimeInputs = with pkgs; [ + ddcutil + gnugrep + coreutils + ]; + text = '' + for bus in $(ddcutil detect --terse | grep -oP '/dev/i2c-\K\d+'); do + (for _ in 1 2 3 4 5; do ddcutil --bus "$bus" setvcp D6 "$1" && break; sleep 1; done) & + done + wait + ''; + }; +in +{ + hardware.i2c.enable = true; + environment.systemPackages = [ + pkgs.ddcutil + monitor-power + ]; + + systemd.services = + let + # ddcutil refuses to start without a cache dir, and services have no HOME + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + CacheDirectory = "ddcutil"; + Environment = "XDG_CACHE_HOME=/var/cache"; + }; + in + { + monitor-power = { + wantedBy = [ "multi-user.target" ]; + after = [ "systemd-modules-load.service" ]; + # Otherwise every rebuild that touches this unit blinks the monitors + restartIfChanged = false; + serviceConfig = serviceConfig // { + ExecStart = "${monitor-power}/bin/monitor-power 01"; + ExecStop = "${monitor-power}/bin/monitor-power 05"; + }; + }; + + monitor-power-sleep = { + wantedBy = [ "sleep.target" ]; + before = [ "sleep.target" ]; + unitConfig.StopWhenUnneeded = true; + serviceConfig = serviceConfig // { + ExecStart = "${monitor-power}/bin/monitor-power 05"; + ExecStop = "${monitor-power}/bin/monitor-power 01"; + }; + }; + }; +} From 2f6ff7a14185fd6021fcde13b090274c51639b8e Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 19 Nov 2026 15:20:57 -0500 Subject: [PATCH 70/70] add new fht compositor patch --- modules/desktop/wm/fht-compositor/default.nix | 1 + .../session-lock-fail-closed.patch | 128 ++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 modules/desktop/wm/fht-compositor/session-lock-fail-closed.patch diff --git a/modules/desktop/wm/fht-compositor/default.nix b/modules/desktop/wm/fht-compositor/default.nix index 0b12ffb..b68ee5d 100644 --- a/modules/desktop/wm/fht-compositor/default.nix +++ b/modules/desktop/wm/fht-compositor/default.nix @@ -79,6 +79,7 @@ in patches = (old.patches or [ ]) ++ [ ./resize-tiled-windows.patch ./lone-modifier.patch + ./session-lock-fail-closed.patch ]; nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ]; diff --git a/modules/desktop/wm/fht-compositor/session-lock-fail-closed.patch b/modules/desktop/wm/fht-compositor/session-lock-fail-closed.patch new file mode 100644 index 0000000..c04e75f --- /dev/null +++ b/modules/desktop/wm/fht-compositor/session-lock-fail-closed.patch @@ -0,0 +1,128 @@ +--- a/src/handlers/session_lock.rs ++++ b/src/handlers/session_lock.rs +@@ -117,9 +117,11 @@ + + impl Fht { + pub fn is_locked(&self) -> bool { ++ // Fail closed: as soon as a lock is requested, session contents and input must be hidden, ++ // even if the lock client is slow (or never) providing surfaces. + matches!( + &self.lock_state, +- LockState::Locked(_) | LockState::Locking(_) ++ LockState::Locked(_) | LockState::Locking(_) | LockState::WaitingForSurfaces(_) + ) + } + +@@ -130,8 +132,11 @@ + + let has_surfaces = self + .output_state +- .values() +- .all(|state| state.lock_surface.is_some()); ++ .iter() ++ // State of disconnected outputs is never removed, and they will never get a lock ++ // surface, so only wait for outputs that still exist. ++ .filter(|(output, _)| self.space.outputs().any(|o| o == *output)) ++ .all(|(_, state)| state.lock_surface.is_some()); + if !has_surfaces { + trace!("not locking session, waiting for other lock surfaces"); + // still didn't map everything. +@@ -161,6 +166,14 @@ + return; + } + ++ // Black while the lock client is still mapping its surfaces, red once locked, where it ++ // can only be seen if a lock surface is missing (the lock client died, new output, etc). ++ let backdrop_color = if matches!(self.lock_state, LockState::Locked(_)) { ++ [1., 0., 0., 1.] ++ } else { ++ [0., 0., 0., 1.] ++ }; ++ + let output_state = self.output_state.get_mut(output).unwrap(); + // Inform that we finally rendered this output with its designated lock surface. + output_state.rendered_with_lock = true; +@@ -176,6 +189,21 @@ + &mut |e| push(e.into()), + ); + } ++ ++ // Always cover the output, so nothing leaks when there's no lock surface (yet), for ++ // example on a newly connected output or if the lock client died. ++ output_state ++ .lock_backdrop ++ .update(output.geometry().size, backdrop_color); ++ push(SessionLockRenderElement::ClearBackdrop( ++ SolidColorRenderElement::from_buffer( ++ &output_state.lock_backdrop, ++ Point::default(), ++ scale, ++ 1.0, ++ Kind::Unspecified, ++ ), ++ )); + } + } + +--- a/src/output.rs ++++ b/src/output.rs +@@ -1,4 +1,5 @@ + use smithay::backend::renderer::damage::OutputDamageTracker; ++use smithay::backend::renderer::element::solid::SolidColorBuffer; + use smithay::output::Output; + use smithay::reexports::calloop::RegistrationToken; + use smithay::wayland::session_lock::LockSurface; +@@ -57,6 +58,8 @@ + pub lock_surface: Option, + /// Whether the output rendered a frame with the [`lock_surface`] yet. + pub rendered_with_lock: bool, ++ /// Backdrop drawn below the [`lock_surface`], covering the output while locked. ++ pub lock_backdrop: SolidColorBuffer, + } + + /// A state machine to describe where an [`Output`](smithay::output::Output) in the redraw loop. +--- a/src/renderer/mod.rs ++++ b/src/renderer/mod.rs +@@ -205,6 +205,8 @@ + self.render_session_lock(renderer, output, &mut |e| { + push(FhtRenderElement::SessionLock(e)) + }); ++ // The lock covers everything, don't even render session contents below it. ++ return rv; + } + + let layer_map = layer_map_for_output(output); +--- a/src/state.rs ++++ b/src/state.rs +@@ -268,8 +268,10 @@ + let all_locked = self + .fht + .output_state +- .values() +- .all(|state| state.rendered_with_lock); ++ .iter() ++ // Disconnected outputs will never render again, ignore them. ++ .filter(|(output, _)| self.fht.space.outputs().any(|o| o == *output)) ++ .all(|(_, state)| state.rendered_with_lock); + + if all_locked { + // All outputs are locked, report success. +@@ -1072,6 +1074,7 @@ + lock_surface: None, + // If we are already locked, the first frame should have the lock surface. + rendered_with_lock: self.is_locked(), ++ lock_backdrop: smithay::backend::renderer::element::solid::SolidColorBuffer::new(output.geometry().size, [0., 0., 0., 1.]), + }; + self.output_state.insert(output.clone(), state); + +@@ -1107,6 +1110,10 @@ + for layer in layer_map_for_output(output).layers() { + layer.layer_surface().send_close() + } ++ ++ // A pending session lock might have only been waiting on this output. ++ self.try_continue_locking(); ++ self.queue_redraw_all(); + } + + pub fn focus_output(&mut self, output: &Output) {