diff options
author | Peter Hoeg <peter@hoeg.com> | 2023-10-19 09:37:56 +0200 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2023-11-03 10:54:41 +0100 |
commit | f4856b55ddcd50269e65720d1a76c77db25883a0 (patch) | |
tree | e79da4328b7164f8494c4edea342e76e25cbf020 /nixos/modules | |
parent | aecc437c1ca338a856e1d50c9c61f802d0710b3d (diff) |
nixos/fwupd: make auto-refresh run (and work)
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/hardware/fwupd.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix index 4e5913fd2751..7a938459d0cb 100644 --- a/nixos/modules/services/hardware/fwupd.nix +++ b/nixos/modules/services/hardware/fwupd.nix @@ -181,7 +181,18 @@ in { # required to update the firmware of disks services.udisks2.enable = true; - systemd.packages = [ cfg.package ]; + systemd = { + packages = [ cfg.package ]; + + # fwupd-refresh expects a user that we do not create, so just run with DynamicUser + # instead and ensure we take ownership of /var/lib/fwupd + services.fwupd-refresh.serviceConfig = { + DynamicUser = true; + StateDirectory = "fwupd"; + }; + + timers.fwupd-refresh.wantedBy = [ "timers.target" ]; + }; security.polkit.enable = true; }; |