Skip to content

Commit

Permalink
Merge pull request #121 from samueldr/feature/holo-dmi-rules
Browse files Browse the repository at this point in the history
steamdeck/hw-support: Loosen (optionally) product_serial access
  • Loading branch information
samueldr authored Aug 15, 2023
2 parents a1c50e0 + b49e2de commit f127923
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/steamdeck/hw-support.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ in
default = cfg.enable;
type = types.bool;
};
enableProductSerialAccess = mkOption {
default = cfg.enable;
type = types.bool;
description = lib.mdDoc ''
> Loosen the product_serial node to `440 / root:wheel`, rather than `400 / root:root`
> to allow the physical users to read S/N without auth.
— holo-dmi-rules 1.0
'';
};
};
};

Expand All @@ -35,6 +44,11 @@ in
# Firmware is required in stage-1 for early KMS.
hardware.enableRedistributableFirmware = true;
})
(mkIf (cfg.enableProductSerialAccess) {
systemd.tmpfiles.rules = [
"z /sys/class/dmi/id/product_serial 440 root wheel - -"
];
})
(mkIf (cfg.enableDefaultStage1Modules) {
boot.initrd.kernelModules = [
"hid-generic"
Expand Down

0 comments on commit f127923

Please sign in to comment.