Update NixOS config.

This commit is contained in:
Elias Gasparis 2025-01-05 08:24:47 +08:00
parent 46c9fbc90e
commit 0df7a4da6f
6 changed files with 7 additions and 6 deletions

26
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
};
}