Skip to content

Commit c4c9593

Browse files
authored
Merge pull request #184 from knuton/bump-nixpkgs-2405
Bump nixpkgs to 24.11
2 parents 9de2b83 + 2f436c4 commit c4c9593

19 files changed

+217
-57
lines changed

application.nix

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ rec {
2323

2424
module = { config, lib, pkgs, ... }:
2525
let
26+
sessionName = "kiosk-browser";
27+
2628
selectDisplay = pkgs.writeShellApplication {
2729
name = "select-display";
2830
runtimeInputs = with pkgs; [
@@ -41,6 +43,18 @@ rec {
4143
./application/limit-vtes.nix
4244
];
4345

46+
boot.blacklistedKernelModules = [
47+
# Blacklist NFC modules conflicting with CCID/PCSC
48+
# https://ludovicrousseau.blogspot.com/2013/11/linux-nfc-driver-conflicts-with-ccid.html
49+
"pn533_usb"
50+
"pn533"
51+
"nfc"
52+
53+
# Disable any USB sound cards to create a closed world where the audio
54+
# landscape on the standard devices is completely predictable.
55+
"snd_usb_audio"
56+
];
57+
4458
# Kiosk runs as a non-privileged user
4559
users.users.play = {
4660
isNormalUser = true;
@@ -64,9 +78,11 @@ rec {
6478
# System-wide packages
6579
environment.systemPackages = with pkgs; [ breeze-contrast-cursor-theme ];
6680

81+
# Avoid bloating system image size
82+
services.speechd.enable = false;
83+
6784
# Kiosk session
68-
services.xserver = let sessionName = "kiosk-browser";
69-
in {
85+
services.xserver = {
7086
enable = true;
7187

7288
desktopManager = {
@@ -103,27 +119,28 @@ rec {
103119
};
104120

105121
displayManager = {
106-
# Always automatically log in play user
107122
lightdm = {
108123
enable = true;
109124
greeter.enable = false;
110125
autoLogin.timeout = 0;
111126
};
112127

113-
autoLogin = {
114-
enable = true;
115-
user = "play";
116-
};
117-
118-
defaultSession = sessionName;
119-
120128
sessionCommands = ''
121129
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
122130
Xcursor.theme: ${pkgs.breeze-contrast-cursor-theme.themeName}
123131
EOF
124132
'';
125133
};
126134
};
135+
services.displayManager = {
136+
# Always automatically log in play user
137+
autoLogin = {
138+
enable = true;
139+
user = "play";
140+
};
141+
142+
defaultSession = sessionName;
143+
};
127144

128145
# Firewall configuration
129146
networking.firewall = {
@@ -166,15 +183,16 @@ rec {
166183
};
167184

168185
# Audio
169-
sound.enable = true;
186+
services.pipewire.enable = false;
187+
170188
hardware.pulseaudio = {
171189
enable = true;
172190
extraConfig = ''
173191
# Use HDMI output
174192
set-card-profile 0 output:hdmi-stereo
175193
# Respond to changes in connected outputs
176194
load-module module-switch-on-port-available
177-
load-module module-switch-on-connect
195+
load-module module-switch-on-connect blacklist=""
178196
'';
179197
};
180198

@@ -183,8 +201,6 @@ rec {
183201

184202
# Enable pcscd for smart card identification
185203
services.pcscd.enable = true;
186-
# Blacklist NFC modules conflicting with CCID (https://ludovicrousseau.blogspot.com/2013/11/linux-nfc-driver-conflicts-with-ccid.html)
187-
boot.blacklistedKernelModules = [ "pn533_usb" "pn533" "nfc" ];
188204
# Allow play user to access pcsc
189205
security.polkit.extraConfig = ''
190206
polkit.addRule(function(action, subject) {

controller/.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 0.26.1
1+
version = 0.27.0
22

33
profile = ocamlformat
44

controller/bindings/connman/connman.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ module Service = struct
684684
Lwt.fail_with
685685
(Printf.sprintf
686686
"Connection failed, unknown error reported by manager: %s\n\
687-
DBus connect exception: %s" err (Printexc.to_string exn)
687+
DBus connect exception: %s"
688+
err (Printexc.to_string exn)
688689
)
689690
| Error exn, Some (AgentError err) ->
690691
Lwt.fail_with

controller/dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(lang dune 3.11)
1+
(lang dune 3.16)

kiosk/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ python3Packages.buildPythonApplication rec {
2323
nativeBuildInputs = [
2424
mypy
2525
qt6.wrapQtAppsHook
26+
wrapGAppsHook
2627
];
2728

2829
propagatedBuildInputs = with python3Packages; [

kiosk/kiosk_browser/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
import os
23
import logging
34
import signal
45
from PyQt6.QtCore import Qt, QUrl
@@ -7,10 +8,22 @@
78

89
from kiosk_browser import main_widget
910

11+
# Workaround for https://bugreports.qt.io/browse/QTBUG-130273 in Qt 6.8.1
12+
# Should be fixed with QT 6.8.2
13+
# Note: doing this via env variables rather than passing `--webEngineArgs`,
14+
# because the env variable overrides the args (and so is easy to break in tests,
15+
# etc)
16+
def tempFixAudioIssues():
17+
curFlags = os.environ.get('QTWEBENGINE_CHROMIUM_FLAGS', "")
18+
os.environ['QTWEBENGINE_CHROMIUM_FLAGS'] = curFlags + " --disable-features=FFmpegAllowLists"
19+
20+
1021
def start(kiosk_url, settings_url, toggle_settings_key, fullscreen = True):
1122

1223
logging.basicConfig(level=logging.INFO)
1324

25+
tempFixAudioIssues()
26+
1427
app = QApplication(sys.argv)
1528
app.setApplicationName("kiosk-browser")
1629

kiosk/kiosk_browser/browser_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _view(self, status):
145145

146146
def user_agent_with_system(user_agent, system_name, system_version):
147147
"""Inject a specific system into a user agent string"""
148-
pattern = re.compile('(Mozilla/5.0) \(([^\)]*)\)(.*)')
148+
pattern = re.compile(r'(Mozilla/5.0) \(([^\)]*)\)(.*)')
149149
m = pattern.match(user_agent)
150150

151151
if m == None:

kiosk/kiosk_browser/dialogable_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def title_line(
117117
font-size: 16px;
118118
""")
119119

120-
button = QtWidgets.QPushButton("", dialog)
120+
button = QtWidgets.QPushButton("×", dialog)
121121
button.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.PointingHandCursor))
122122
button.setStyleSheet("""
123123
QPushButton {

pkgs/default.nix

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
let
44

55
nixpkgs = builtins.fetchTarball {
6-
# nixos-23.11 2024-03-18
7-
url = "https://github.com/nixos/nixpkgs/archive/614b4613980a522ba49f0d194531beddbb7220d3.tar.gz";
8-
sha256 = "1kipdjdjcd1brm5a9lzlhffrgyid0byaqwfnpzlmw3q825z7nj6w";
6+
# release-24.11 2025-02-10
7+
url = "https://github.com/NixOS/nixpkgs/archive/edd84e9bffdf1c0ceba05c0d868356f28a1eb7de.tar.gz";
8+
sha256 = "1gb61gahkq74hqiw8kbr9j0qwf2wlwnsvhb7z68zhm8wa27grqr0";
99
};
1010

1111
overlay =
@@ -15,7 +15,7 @@ let
1515

1616
rauc = (import ./rauc) super;
1717

18-
ocamlPackages = super.ocamlPackages.overrideScope' (self: super: {
18+
ocamlPackages = super.ocamlPackages.overrideScope (self: super: {
1919
semver = self.callPackage ./ocaml-modules/semver {};
2020
obus = self.callPackage ./ocaml-modules/obus {};
2121
opium = self.callPackage ./ocaml-modules/opium {};
@@ -25,14 +25,6 @@ let
2525
./ocaml-modules/ppx_protocol_conv_jsonm {};
2626
});
2727

28-
# fixes getExe warning, used in tests
29-
# Should be obsolete after upgrading to nixpkgs 24.05: https://github.com/NixOS/nixpkgs/pull/273952
30-
tinyproxy = super.tinyproxy.overrideAttrs (_: prev: {
31-
meta = prev.meta // {
32-
mainProgram = "tinyproxy";
33-
};
34-
});
35-
3628
};
3729

3830
in

testing/end-to-end/profile.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
];
77

88
config = {
9-
# don't need opengl for running tests, reduces image size vastly
10-
hardware.opengl.enable = false;
9+
# disable hardware-accelerated graphics, reduces image size vastly
10+
hardware.graphics.enable = false;
1111

1212
# test-instrumentation.nix sets this in the boot as kernel param,
1313
# but since we are booting with a custom GRUB config it has no effect,

0 commit comments

Comments
 (0)