Update NixOS config.

This commit is contained in:
Elias Gasparis 2025-01-05 07:56:48 +08:00
parent 05a01e9941
commit 4b0e204074
6 changed files with 1 additions and 1 deletions

26
nixosModules/systemd.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, pkgs, lib, ... }:
{
systemd.timers."update-flatpak" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "1m";
OnCalendar = "daily";
Unit = "update-flatpak.service";
};
};
systemd.services."update-flatpak" = {
script = ''
set -eu
${pkgs.flatpak}/bin/flatpak update --noninteractive --assumeyes
'';
serviceConfig = {
Type = "oneshot";
User = "root";
};
wantedBy = [ "multi-user.target" ]; # Ensure the service starts after rebuild
};
}