trying to unmodularize my setup

This commit is contained in:
Elias Gasparis 2025-01-05 11:49:14 +08:00
parent 195383e6d9
commit 2f5ed1481c
9 changed files with 56 additions and 20 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
};
}