this works
This commit is contained in:
parent
0b67ad987d
commit
412ee8149e
1 changed files with 34 additions and 30 deletions
|
|
@ -267,39 +267,43 @@
|
||||||
flatpak.enable = true;
|
flatpak.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.timers."update-flake" = {
|
systemd = {
|
||||||
wantedBy = [ "timers.target" ];
|
timers."update-flake" = {
|
||||||
timerConfig = {
|
wantedBy = [ "timers.target" ];
|
||||||
OnCalendar = "daily";
|
timerConfig = {
|
||||||
Persistent = true;
|
OnCalendar = "daily";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."update-flake" = {
|
services = {
|
||||||
path = with pkgs; [
|
"update-flake" = {
|
||||||
git
|
path = with pkgs; [
|
||||||
openssh
|
git
|
||||||
nix
|
openssh
|
||||||
nixos-rebuild
|
nix
|
||||||
];
|
nixos-rebuild
|
||||||
script = ''
|
];
|
||||||
[[ ! -d '/root/nixconf' ]] && cd /root && git clone git@github.com:itepastra/nixconf
|
script = ''
|
||||||
cd /root/nixconf
|
[[ ! -d '/root/nixconf' ]] && cd /root && git clone git@github.com:itepastra/nixconf
|
||||||
git pull
|
cd /root/nixconf
|
||||||
nix flake update --commit-lock-file /root/nixconf
|
git pull
|
||||||
nixos-rebuild switch --flake .
|
nix flake update --commit-lock-file /root/nixconf
|
||||||
git push
|
nixos-rebuild switch --flake .
|
||||||
'';
|
git push
|
||||||
serviceConfig = {
|
'';
|
||||||
Type = "oneshot";
|
serviceConfig = {
|
||||||
User = "root";
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
};
|
||||||
|
wants = [
|
||||||
|
"network-online.target"
|
||||||
|
];
|
||||||
|
after = [
|
||||||
|
"network-online.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
wants = [
|
|
||||||
"network-online.target"
|
|
||||||
];
|
|
||||||
after = [
|
|
||||||
"network-online.target"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue