mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
feat: enable auto update system service
This commit is contained in:
parent
099e29e327
commit
47f4aa7799
6 changed files with 119 additions and 34 deletions
|
@ -66,6 +66,22 @@
|
|||
ExecStart = "/nix/var/nix/profiles/system/bin/switch-to-configuration test";
|
||||
};
|
||||
};
|
||||
refresh = let
|
||||
flakeLocation = "/home/youwen/.config/liminalOS";
|
||||
in {
|
||||
description = "Automatically update liminalOS";
|
||||
after = [ "network-online.target" ];
|
||||
requires = [ "network-online.target" ];
|
||||
script = ''
|
||||
cd ${flakeLocation}
|
||||
${pkgs.git}/bin/git config --global --add safe.directory ${flakeLocation}
|
||||
${pkgs.git}/bin/git pull
|
||||
'';
|
||||
serviceConfig = {
|
||||
Environment = "HOME=/root";
|
||||
};
|
||||
wantedBy = [ ];
|
||||
};
|
||||
};
|
||||
systemd.timers = {
|
||||
colorscheme-dawn = {
|
||||
|
@ -86,6 +102,15 @@
|
|||
Unit = "colorscheme-dusk.service";
|
||||
};
|
||||
};
|
||||
refresh = {
|
||||
description = "Schedule daily system updates";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
Unit = "refresh.service";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.polkit.extraConfig = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue